diff options
author | Christian <c@ethdev.com> | 2015-02-17 00:33:13 +0800 |
---|---|---|
committer | Christian <c@ethdev.com> | 2015-02-17 02:35:53 +0800 |
commit | a33fa270f689168f84c0db6aa673658ae92fb495 (patch) | |
tree | 7a7916674b8dd8deef8276887f98e8a1d4dc6a03 /Types.cpp | |
parent | 971cc9b5b9242f36c1fa288615e2bf2d762fbd52 (diff) | |
download | dexon-solidity-a33fa270f689168f84c0db6aa673658ae92fb495.tar.gz dexon-solidity-a33fa270f689168f84c0db6aa673658ae92fb495.tar.zst dexon-solidity-a33fa270f689168f84c0db6aa673658ae92fb495.zip |
Calldata byte arrays stored on the stack.
Diffstat (limited to 'Types.cpp')
-rw-r--r-- | Types.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -540,12 +540,19 @@ bool ByteArrayType::operator==(Type const& _other) const unsigned ByteArrayType::getSizeOnStack() const { if (m_location == Location::CallData) - return 0; + // offset, length (stack top) + return 2; else + // offset return 1; } -const MemberList ByteArrayType::s_byteArrayMemberList = MemberList({{"length", make_shared<IntegerType >(256)}}); +shared_ptr<ByteArrayType> ByteArrayType::copyForLocation(ByteArrayType::Location _location) const +{ + return make_shared<ByteArrayType>(_location); +} + +const MemberList ByteArrayType::s_byteArrayMemberList = MemberList({{"length", make_shared<IntegerType>(256)}}); bool ContractType::operator==(Type const& _other) const { |