diff options
author | chriseth <chris@ethereum.org> | 2016-11-18 00:32:21 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-11-18 00:32:21 +0800 |
commit | b46a14f4a8e128c08336763abf8bbf7c111f464d (patch) | |
tree | ee20fa35cbc19eddcddd1013e745b387e7371be3 /libevmasm/AssemblyItem.h | |
parent | c811691861eb51520d9fd51d56770f14990b0320 (diff) | |
parent | 2c14a96820233809db4360b39f5f02039be5730a (diff) | |
download | dexon-solidity-b46a14f4a8e128c08336763abf8bbf7c111f464d.tar dexon-solidity-b46a14f4a8e128c08336763abf8bbf7c111f464d.tar.gz dexon-solidity-b46a14f4a8e128c08336763abf8bbf7c111f464d.tar.bz2 dexon-solidity-b46a14f4a8e128c08336763abf8bbf7c111f464d.tar.lz dexon-solidity-b46a14f4a8e128c08336763abf8bbf7c111f464d.tar.xz dexon-solidity-b46a14f4a8e128c08336763abf8bbf7c111f464d.tar.zst dexon-solidity-b46a14f4a8e128c08336763abf8bbf7c111f464d.zip |
Merge pull request #1122 from ethereum/firstClassFunctions
Functions as first-class types.
Diffstat (limited to 'libevmasm/AssemblyItem.h')
-rw-r--r-- | libevmasm/AssemblyItem.h | 8 |
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; } |