diff options
author | chriseth <c@ethdev.com> | 2015-03-12 01:09:35 +0800 |
---|---|---|
committer | chriseth <c@ethdev.com> | 2015-03-17 01:07:14 +0800 |
commit | fff3f98f58345d45dcf518d7dccbfa0d0a4e67b7 (patch) | |
tree | fd00609ec95fd240a8a41efcd9461b60ea15b142 /LValue.h | |
parent | c34e1da6dbc8c66dcdfcb0f09ee0cf8815473124 (diff) | |
download | dexon-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.h | 10 |
1 files changed, 4 insertions, 6 deletions
@@ -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; }; /** |