aboutsummaryrefslogtreecommitdiffstats
path: root/Types.cpp
diff options
context:
space:
mode:
authorChristian <c@ethdev.com>2015-02-17 00:33:13 +0800
committerChristian <c@ethdev.com>2015-02-17 02:35:53 +0800
commita33fa270f689168f84c0db6aa673658ae92fb495 (patch)
tree7a7916674b8dd8deef8276887f98e8a1d4dc6a03 /Types.cpp
parent971cc9b5b9242f36c1fa288615e2bf2d762fbd52 (diff)
downloaddexon-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.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/Types.cpp b/Types.cpp
index 99515a3a..6149f34f 100644
--- a/Types.cpp
+++ b/Types.cpp
@@ -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
{