diff options
author | chriseth <chris@ethereum.org> | 2017-08-07 18:41:45 +0800 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2017-08-10 06:18:42 +0800 |
commit | b38f31617e83fac70d9ca542cc79cc23a7d6a2ee (patch) | |
tree | b089030d41ce1b8c399027b374d3782976b9a7ca /libsolidity/ast/Types.cpp | |
parent | 279e64ae75c5615ca3fc7570a3d533270e43caac (diff) | |
download | dexon-solidity-b38f31617e83fac70d9ca542cc79cc23a7d6a2ee.tar dexon-solidity-b38f31617e83fac70d9ca542cc79cc23a7d6a2ee.tar.gz dexon-solidity-b38f31617e83fac70d9ca542cc79cc23a7d6a2ee.tar.bz2 dexon-solidity-b38f31617e83fac70d9ca542cc79cc23a7d6a2ee.tar.lz dexon-solidity-b38f31617e83fac70d9ca542cc79cc23a7d6a2ee.tar.xz dexon-solidity-b38f31617e83fac70d9ca542cc79cc23a7d6a2ee.tar.zst dexon-solidity-b38f31617e83fac70d9ca542cc79cc23a7d6a2ee.zip |
Add isDynamicallyEncoded member function to types.
Diffstat (limited to 'libsolidity/ast/Types.cpp')
-rw-r--r-- | libsolidity/ast/Types.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/libsolidity/ast/Types.cpp b/libsolidity/ast/Types.cpp index 56fdd508..cf43d3fe 100644 --- a/libsolidity/ast/Types.cpp +++ b/libsolidity/ast/Types.cpp @@ -1408,6 +1408,11 @@ unsigned ArrayType::calldataEncodedSize(bool _padded) const return unsigned(size); } +bool ArrayType::isDynamicallyEncoded() const +{ + return isDynamicallySized() || baseType()->isDynamicallyEncoded(); +} + u256 ArrayType::storageSize() const { if (isDynamicallySized()) @@ -1710,6 +1715,11 @@ unsigned StructType::calldataEncodedSize(bool _padded) const return size; } +bool StructType::isDynamicallyEncoded() const +{ + solAssert(false, "Structs are not yet supported in the ABI."); +} + u256 StructType::memorySize() const { u256 size; |