aboutsummaryrefslogtreecommitdiffstats
path: root/LValue.h
diff options
context:
space:
mode:
authorchriseth <c@ethdev.com>2015-03-12 01:09:35 +0800
committerchriseth <c@ethdev.com>2015-03-17 01:07:14 +0800
commitfff3f98f58345d45dcf518d7dccbfa0d0a4e67b7 (patch)
treefd00609ec95fd240a8a41efcd9461b60ea15b142 /LValue.h
parentc34e1da6dbc8c66dcdfcb0f09ee0cf8815473124 (diff)
downloaddexon-solidity-fff3f98f58345d45dcf518d7dccbfa0d0a4e67b7.tar
dexon-solidity-fff3f98f58345d45dcf518d7dccbfa0d0a4e67b7.tar.gz
dexon-solidity-fff3f98f58345d45dcf518d7dccbfa0d0a4e67b7.tar.bz2
dexon-solidity-fff3f98f58345d45dcf518d7dccbfa0d0a4e67b7.tar.lz
dexon-solidity-fff3f98f58345d45dcf518d7dccbfa0d0a4e67b7.tar.xz
dexon-solidity-fff3f98f58345d45dcf518d7dccbfa0d0a4e67b7.tar.zst
dexon-solidity-fff3f98f58345d45dcf518d7dccbfa0d0a4e67b7.zip
Enlarge storage references to two stack slots.
Diffstat (limited to 'LValue.h')
-rw-r--r--LValue.h10
1 files changed, 4 insertions, 6 deletions
diff --git a/LValue.h b/LValue.h
index c57c80e3..ad622516 100644
--- a/LValue.h
+++ b/LValue.h
@@ -98,7 +98,9 @@ private:
};
/**
- * Reference to some item in storage. The (starting) position of the item is stored on the stack.
+ * Reference to some item in storage. On the stack this is <storage key> <offset_inside_value>,
+ * where 0 <= offset_inside_value < 32 and an offset of i means that the value is multiplied
+ * by 2**i before storing it.
*/
class StorageItem: public LValue
{
@@ -107,6 +109,7 @@ public:
StorageItem(CompilerContext& _compilerContext, Declaration const& _declaration);
/// Constructs the LValue and assumes that the storage reference is already on the stack.
StorageItem(CompilerContext& _compilerContext, Type const& _type);
+ virtual unsigned sizeOnStack() const { return 2; }
virtual void retrieveValue(SourceLocation const& _location, bool _remove = false) const override;
virtual void storeValue(
Type const& _sourceType,
@@ -117,11 +120,6 @@ public:
SourceLocation const& _location = SourceLocation(),
bool _removeReference = true
) const override;
-
-private:
- /// Number of stack elements occupied by the value (not the reference).
- /// Only used for value types.
- unsigned m_size;
};
/**