diff options
author | chriseth <c@ethdev.com> | 2015-07-14 17:58:16 +0800 |
---|---|---|
committer | chriseth <c@ethdev.com> | 2015-07-14 17:58:16 +0800 |
commit | 73275e18250954431c58323a2d678409b0824568 (patch) | |
tree | 47a2216e5d55389211e30b5117a8f2e123923898 /Types.cpp | |
parent | da818b1acdd8f02fccd18779cfb0ac397d7e61b1 (diff) | |
download | dexon-solidity-73275e18250954431c58323a2d678409b0824568.tar.gz dexon-solidity-73275e18250954431c58323a2d678409b0824568.tar.zst dexon-solidity-73275e18250954431c58323a2d678409b0824568.zip |
Use only a single stack slot for storage references.
Diffstat (limited to 'Types.cpp')
-rw-r--r-- | Types.cpp | 14 |
1 files changed, 2 insertions, 12 deletions
@@ -823,11 +823,9 @@ unsigned ArrayType::getSizeOnStack() const if (m_location == DataLocation::CallData) // offset [length] (stack top) return 1 + (isDynamicallySized() ? 1 : 0); - else if (m_location == DataLocation::Storage) - // storage_key storage_offset - return 2; else - // offset + // storage slot or memory offset + // byte offset inside storage value is omitted return 1; } @@ -1035,14 +1033,6 @@ bool StructType::canLiveOutsideStorage() const return true; } -unsigned StructType::getSizeOnStack() const -{ - if (location() == DataLocation::Storage) - return 2; // slot and offset - else - return 1; -} - string StructType::toString(bool _short) const { string ret = "struct " + m_struct.getName(); |