mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Implementing conversion from calldata slices to memory arrays.
This commit is contained in:
parent
0efd52a38e
commit
b99a74fb34
@ -3,6 +3,7 @@
|
|||||||
Language Features:
|
Language Features:
|
||||||
* Code generator: Support copying dynamically encoded structs from calldata to memory.
|
* Code generator: Support copying dynamically encoded structs from calldata to memory.
|
||||||
* Code generator: Support copying of nested arrays from calldata to memory.
|
* Code generator: Support copying of nested arrays from calldata to memory.
|
||||||
|
* Code generator: Support conversion from calldata slices to memory and storage arrays.
|
||||||
* The fallback function can now also have a single ``calldata`` argument (equaling ``msg.data``) and return ``bytes memory`` (which will not be ABI-encoded but returned as-is).
|
* The fallback function can now also have a single ``calldata`` argument (equaling ``msg.data``) and return ``bytes memory`` (which will not be ABI-encoded but returned as-is).
|
||||||
* Wasm backend: Add ``i32.select`` and ``i64.select`` instructions.
|
* Wasm backend: Add ``i32.select`` and ``i64.select`` instructions.
|
||||||
|
|
||||||
|
@ -1051,11 +1051,11 @@ void CompilerUtils::convertType(
|
|||||||
case Type::Category::ArraySlice:
|
case Type::Category::ArraySlice:
|
||||||
{
|
{
|
||||||
auto& typeOnStack = dynamic_cast<ArraySliceType const&>(_typeOnStack);
|
auto& typeOnStack = dynamic_cast<ArraySliceType const&>(_typeOnStack);
|
||||||
solUnimplementedAssert(
|
solAssert(_targetType.category() == Type::Category::Array, "");
|
||||||
_targetType.dataStoredIn(DataLocation::CallData),
|
auto const& targetArrayType = dynamic_cast<ArrayType const&>(_targetType);
|
||||||
"Conversion from calldata slices to memory not yet implemented."
|
solAssert(targetArrayType == *typeOnStack.arrayType().copyForLocation(targetArrayType.location(), false), "");
|
||||||
);
|
if (!_targetType.dataStoredIn(DataLocation::CallData))
|
||||||
solAssert(_targetType == typeOnStack.arrayType(), "");
|
return convertType(typeOnStack.arrayType(), _targetType);
|
||||||
solUnimplementedAssert(
|
solUnimplementedAssert(
|
||||||
typeOnStack.arrayType().location() == DataLocation::CallData &&
|
typeOnStack.arrayType().location() == DataLocation::CallData &&
|
||||||
typeOnStack.arrayType().isDynamicallySized() &&
|
typeOnStack.arrayType().isDynamicallySized() &&
|
||||||
|
Loading…
Reference in New Issue
Block a user