diff options
author | chriseth <c@ethdev.com> | 2015-05-20 06:27:07 +0800 |
---|---|---|
committer | chriseth <c@ethdev.com> | 2015-05-20 06:28:15 +0800 |
commit | d015945a1db28ba55ce674a73091742b781d2d9d (patch) | |
tree | 1dfbc3afa30e700181e04b99c9685ff707043024 /AssemblyItem.h | |
parent | 3ecd54a83513d8b59b5e27c671a036870cf1bc90 (diff) | |
download | dexon-solidity-d015945a1db28ba55ce674a73091742b781d2d9d.tar.gz dexon-solidity-d015945a1db28ba55ce674a73091742b781d2d9d.tar.zst dexon-solidity-d015945a1db28ba55ce674a73091742b781d2d9d.zip |
Gas estimation taking known state into account.
Diffstat (limited to 'AssemblyItem.h')
-rw-r--r-- | AssemblyItem.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/AssemblyItem.h b/AssemblyItem.h index b3012a7e..7d8f3d9a 100644 --- a/AssemblyItem.h +++ b/AssemblyItem.h @@ -84,11 +84,17 @@ public: JumpType getJumpType() const { return m_jumpType; } std::string getJumpTypeAsString() const; + void setPushedValue(u256 const& _value) const { m_pushedValue = std::make_shared<u256>(_value); } + u256 const* pushedValue() const { return m_pushedValue.get(); } + private: AssemblyItemType m_type; u256 m_data; SourceLocation m_location; JumpType m_jumpType = JumpType::Ordinary; + /// Pushed value for operations with data to be determined during assembly stage, + /// e.g. PushSubSize, PushTag, PushSub, etc. + mutable std::shared_ptr<u256> m_pushedValue; }; using AssemblyItems = std::vector<AssemblyItem>; |