aboutsummaryrefslogtreecommitdiffstats
path: root/AssemblyItem.h
diff options
context:
space:
mode:
authorchriseth <c@ethdev.com>2015-05-20 06:27:07 +0800
committerchriseth <c@ethdev.com>2015-05-20 06:28:15 +0800
commitd015945a1db28ba55ce674a73091742b781d2d9d (patch)
tree1dfbc3afa30e700181e04b99c9685ff707043024 /AssemblyItem.h
parent3ecd54a83513d8b59b5e27c671a036870cf1bc90 (diff)
downloaddexon-solidity-d015945a1db28ba55ce674a73091742b781d2d9d.tar
dexon-solidity-d015945a1db28ba55ce674a73091742b781d2d9d.tar.gz
dexon-solidity-d015945a1db28ba55ce674a73091742b781d2d9d.tar.bz2
dexon-solidity-d015945a1db28ba55ce674a73091742b781d2d9d.tar.lz
dexon-solidity-d015945a1db28ba55ce674a73091742b781d2d9d.tar.xz
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.h6
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>;