diff --git a/libsolidity/codegen/YulUtilFunctions.cpp b/libsolidity/codegen/YulUtilFunctions.cpp index 4b1f8024d..3ea3b2c84 100644 --- a/libsolidity/codegen/YulUtilFunctions.cpp +++ b/libsolidity/codegen/YulUtilFunctions.cpp @@ -1818,7 +1818,7 @@ string YulUtilFunctions::copyArrayToStorageFunction(ArrayType const& _fromType, for { let i := 0 } lt(i, length) {i := add(i, 1)} { - let := + let := (value, srcPtr) @@ -1827,14 +1827,14 @@ string YulUtilFunctions::copyArrayToStorageFunction(ArrayType const& _fromType, - let := (srcPtr) + let := (srcPtr) - let := srcPtr + let := srcPtr - (elementSlot, ) + (elementSlot, ) srcPtr := add(srcPtr, ) @@ -1862,9 +1862,9 @@ string YulUtilFunctions::copyArrayToStorageFunction(ArrayType const& _fromType, templ("arrayLength",arrayLengthFunction(_fromType)); templ("dstDataLocation", arrayDataAreaFunction(_toType)); if (fromMemory || (fromCalldata && _fromType.baseType()->isValueType())) - templ("readFromCalldataOrMemory", readFromMemoryOrCalldata(*_fromType.baseType(), fromCalldata)); - templ("elementValues", suffixedVariableNameList( - "elementValue_", + templ("readFromMemoryOrCalldata", readFromMemoryOrCalldata(*_fromType.baseType(), fromCalldata)); + templ("stackItems", suffixedVariableNameList( + "stackItem_", 0, _fromType.baseType()->stackItems().size() )); @@ -2004,13 +2004,13 @@ string YulUtilFunctions::copyValueArrayToStorageFunction(ArrayType const& _fromT for { let j := 0 } lt(j, ) { j := add(j, 1) } { - let := ( + let := ( (srcSlotValue, mul(, srcItemIndexInSlot)) ) - let := (srcPtr) + let := (srcPtr) - let itemValue := () + let itemValue := () dstSlotValue := (dstSlotValue, mul(, j), itemValue) @@ -2035,13 +2035,13 @@ string YulUtilFunctions::copyValueArrayToStorageFunction(ArrayType const& _fromT for { let j := 0 } lt(j, spill) { j := add(j, 1) } { - let := ( + let := ( (srcSlotValue, mul(, srcItemIndexInSlot)) ) - let := (srcPtr) + let := (srcPtr) - let itemValue := () + let itemValue := () dstSlotValue := (dstSlotValue, mul(, j), itemValue) @@ -2063,12 +2063,12 @@ string YulUtilFunctions::copyValueArrayToStorageFunction(ArrayType const& _fromT templ("panic", panicFunction(PanicCode::ResourceError)); templ("isFromDynamicCalldata", _fromType.isDynamicallySized() && fromCalldata); templ("isFromStorage", fromStorage); - templ("readFromCalldataOrMemory", readFromMemoryOrCalldata(*_fromType.baseType(), fromCalldata)); + templ("readFromMemoryOrCalldata", readFromMemoryOrCalldata(*_fromType.baseType(), fromCalldata)); templ("srcDataLocation", arrayDataAreaFunction(_fromType)); templ("dstDataLocation", arrayDataAreaFunction(_toType)); templ("srcStride", to_string(_fromType.storageStride())); - templ("elementValues", suffixedVariableNameList( - "elementValue_", + templ("stackItems", suffixedVariableNameList( + "stackItem_", 0, _fromType.baseType()->stackItems().size() ));