aboutsummaryrefslogtreecommitdiffstats
path: root/Types.cpp
diff options
context:
space:
mode:
authorchriseth <c@ethdev.com>2015-07-14 17:58:16 +0800
committerchriseth <c@ethdev.com>2015-07-14 17:58:16 +0800
commit73275e18250954431c58323a2d678409b0824568 (patch)
tree47a2216e5d55389211e30b5117a8f2e123923898 /Types.cpp
parentda818b1acdd8f02fccd18779cfb0ac397d7e61b1 (diff)
downloaddexon-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.cpp14
1 files changed, 2 insertions, 12 deletions
diff --git a/Types.cpp b/Types.cpp
index 3ea9caa7..0ecb01d2 100644
--- a/Types.cpp
+++ b/Types.cpp
@@ -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();