Skip to content

Commit 4c84b77

Browse files
committed
Review suggested renaming.
1 parent c3781f7 commit 4c84b77

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

libsolidity/codegen/YulUtilFunctions.cpp

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1818,7 +1818,7 @@ string YulUtilFunctions::copyArrayToStorageFunction(ArrayType const& _fromType,
18181818
18191819
for { let i := 0 } lt(i, length) {i := add(i, 1)} {
18201820
<?fromCalldata>
1821-
let <elementValues> :=
1821+
let <stackItems> :=
18221822
<?dynamicallyEncodedBase>
18231823
<accessCalldataTail>(value, srcPtr)
18241824
<!dynamicallyEncodedBase>
@@ -1827,14 +1827,14 @@ string YulUtilFunctions::copyArrayToStorageFunction(ArrayType const& _fromType,
18271827
</fromCalldata>
18281828
18291829
<?fromMemory>
1830-
let <elementValues> := <readFromCalldataOrMemory>(srcPtr)
1830+
let <stackItems> := <readFromMemoryOrCalldata>(srcPtr)
18311831
</fromMemory>
18321832
18331833
<?fromStorage>
1834-
let <elementValues> := srcPtr
1834+
let <stackItems> := srcPtr
18351835
</fromStorage>
18361836
1837-
<updateStorageValue>(elementSlot, <elementValues>)
1837+
<updateStorageValue>(elementSlot, <stackItems>)
18381838
18391839
srcPtr := add(srcPtr, <srcStride>)
18401840
@@ -1862,9 +1862,9 @@ string YulUtilFunctions::copyArrayToStorageFunction(ArrayType const& _fromType,
18621862
templ("arrayLength",arrayLengthFunction(_fromType));
18631863
templ("dstDataLocation", arrayDataAreaFunction(_toType));
18641864
if (fromMemory || (fromCalldata && _fromType.baseType()->isValueType()))
1865-
templ("readFromCalldataOrMemory", readFromMemoryOrCalldata(*_fromType.baseType(), fromCalldata));
1866-
templ("elementValues", suffixedVariableNameList(
1867-
"elementValue_",
1865+
templ("readFromMemoryOrCalldata", readFromMemoryOrCalldata(*_fromType.baseType(), fromCalldata));
1866+
templ("stackItems", suffixedVariableNameList(
1867+
"stackItem_",
18681868
0,
18691869
_fromType.baseType()->stackItems().size()
18701870
));
@@ -2004,13 +2004,13 @@ string YulUtilFunctions::copyValueArrayToStorageFunction(ArrayType const& _fromT
20042004
<?multipleItemsPerSlotDst>for { let j := 0 } lt(j, <itemsPerSlot>) { j := add(j, 1) } </multipleItemsPerSlotDst>
20052005
{
20062006
<?isFromStorage>
2007-
let <elementValues> := <convert>(
2007+
let <stackItems> := <convert>(
20082008
<extractFromSlot>(srcSlotValue, mul(<srcStride>, srcItemIndexInSlot))
20092009
)
20102010
<!isFromStorage>
2011-
let <elementValues> := <readFromCalldataOrMemory>(srcPtr)
2011+
let <stackItems> := <readFromMemoryOrCalldata>(srcPtr)
20122012
</isFromStorage>
2013-
let itemValue := <prepareStore>(<elementValues>)
2013+
let itemValue := <prepareStore>(<stackItems>)
20142014
dstSlotValue :=
20152015
<?multipleItemsPerSlotDst>
20162016
<updateByteSlice>(dstSlotValue, mul(<dstStride>, j), itemValue)
@@ -2035,13 +2035,13 @@ string YulUtilFunctions::copyValueArrayToStorageFunction(ArrayType const& _fromT
20352035
<!sameTypeFromStorage>
20362036
for { let j := 0 } lt(j, spill) { j := add(j, 1) } {
20372037
<?isFromStorage>
2038-
let <elementValues> := <convert>(
2038+
let <stackItems> := <convert>(
20392039
<extractFromSlot>(srcSlotValue, mul(<srcStride>, srcItemIndexInSlot))
20402040
)
20412041
<!isFromStorage>
2042-
let <elementValues> := <readFromCalldataOrMemory>(srcPtr)
2042+
let <stackItems> := <readFromMemoryOrCalldata>(srcPtr)
20432043
</isFromStorage>
2044-
let itemValue := <prepareStore>(<elementValues>)
2044+
let itemValue := <prepareStore>(<stackItems>)
20452045
dstSlotValue := <updateByteSlice>(dstSlotValue, mul(<dstStride>, j), itemValue)
20462046
20472047
<updateSrcPtr>
@@ -2063,12 +2063,12 @@ string YulUtilFunctions::copyValueArrayToStorageFunction(ArrayType const& _fromT
20632063
templ("panic", panicFunction(PanicCode::ResourceError));
20642064
templ("isFromDynamicCalldata", _fromType.isDynamicallySized() && fromCalldata);
20652065
templ("isFromStorage", fromStorage);
2066-
templ("readFromCalldataOrMemory", readFromMemoryOrCalldata(*_fromType.baseType(), fromCalldata));
2066+
templ("readFromMemoryOrCalldata", readFromMemoryOrCalldata(*_fromType.baseType(), fromCalldata));
20672067
templ("srcDataLocation", arrayDataAreaFunction(_fromType));
20682068
templ("dstDataLocation", arrayDataAreaFunction(_toType));
20692069
templ("srcStride", to_string(_fromType.storageStride()));
2070-
templ("elementValues", suffixedVariableNameList(
2071-
"elementValue_",
2070+
templ("stackItems", suffixedVariableNameList(
2071+
"stackItem_",
20722072
0,
20732073
_fromType.baseType()->stackItems().size()
20742074
));

0 commit comments

Comments
 (0)