aboutsummaryrefslogtreecommitdiffstats
path: root/libevmasm/AssemblyItem.h
diff options
context:
space:
mode:
authorchriseth <c@ethdev.com>2016-11-11 01:16:21 +0800
committerchriseth <c@ethdev.com>2016-11-16 21:37:18 +0800
commite543bd34c0b4884b5a27555f698f50af6a1c0b81 (patch)
treeef2c12e4767a3d38603323212face114213ca4b4 /libevmasm/AssemblyItem.h
parentee3efa67a8d3eb4077786fd745c1925a916419f5 (diff)
downloaddexon-solidity-e543bd34c0b4884b5a27555f698f50af6a1c0b81.tar.gz
dexon-solidity-e543bd34c0b4884b5a27555f698f50af6a1c0b81.tar.zst
dexon-solidity-e543bd34c0b4884b5a27555f698f50af6a1c0b81.zip
Stored combined creation and runtime tags.
Includes a change to Assembly to allow tags from sub-assemblies to be used. Sorry, this get a bit bigger than I thought.
Diffstat (limited to 'libevmasm/AssemblyItem.h')
-rw-r--r--libevmasm/AssemblyItem.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/libevmasm/AssemblyItem.h b/libevmasm/AssemblyItem.h
index 1c3d9789..1a2fb1e6 100644
--- a/libevmasm/AssemblyItem.h
+++ b/libevmasm/AssemblyItem.h
@@ -69,6 +69,14 @@ public:
AssemblyItem tag() const { assertThrow(m_type == PushTag || m_type == Tag, Exception, ""); return AssemblyItem(Tag, m_data); }
AssemblyItem pushTag() const { assertThrow(m_type == PushTag || m_type == Tag, Exception, ""); return AssemblyItem(PushTag, m_data); }
+ /// Converts the tag to a subassembly tag. This has to be called in order to move a tag across assemblies.
+ /// @param _subId the identifier of the subassembly the tag is taken from.
+ AssemblyItem toSubAssemblyTag(size_t _subId) const;
+ /// @returns splits the data of the push tag into sub assembly id and actual tag id.
+ /// The sub assembly id of non-foreign push tags is -1.
+ std::pair<size_t, size_t> splitForeignPushTag() const;
+ /// Sets sub-assembly part and tag for a push tag.
+ void setPushTagSubIdAndTag(size_t _subId, size_t _tag);
AssemblyItemType type() const { return m_type; }
u256 const& data() const { return m_data; }