aboutsummaryrefslogtreecommitdiffstats
path: root/libevmasm/AssemblyItem.h
diff options
context:
space:
mode:
authorchriseth <c@ethdev.com>2016-11-15 21:01:11 +0800
committerchriseth <c@ethdev.com>2017-01-03 21:13:49 +0800
commita285ca44f228236ab92eb8dc9d878053829276b4 (patch)
tree68040d0309c0d4de80514a7f58f27dbe7a72a71b /libevmasm/AssemblyItem.h
parent0bd8c204f04f679b4371199d876bc6160d913782 (diff)
downloaddexon-solidity-a285ca44f228236ab92eb8dc9d878053829276b4.tar
dexon-solidity-a285ca44f228236ab92eb8dc9d878053829276b4.tar.gz
dexon-solidity-a285ca44f228236ab92eb8dc9d878053829276b4.tar.bz2
dexon-solidity-a285ca44f228236ab92eb8dc9d878053829276b4.tar.lz
dexon-solidity-a285ca44f228236ab92eb8dc9d878053829276b4.tar.xz
dexon-solidity-a285ca44f228236ab92eb8dc9d878053829276b4.tar.zst
dexon-solidity-a285ca44f228236ab92eb8dc9d878053829276b4.zip
Assembly output for Assembly object.
Diffstat (limited to 'libevmasm/AssemblyItem.h')
-rw-r--r--libevmasm/AssemblyItem.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/libevmasm/AssemblyItem.h b/libevmasm/AssemblyItem.h
index b5bd3ed8..cddfb17c 100644
--- a/libevmasm/AssemblyItem.h
+++ b/libevmasm/AssemblyItem.h
@@ -97,6 +97,9 @@ public:
unsigned bytesRequired(unsigned _addressLength) const;
int deposit() const;
+ /// @returns true if the assembly item can be used in a functional context.
+ bool canBeFunctional() const;
+
bool match(AssemblyItem const& _i) const { return _i.m_type == UndefinedItem || (m_type == _i.m_type && (m_type != Operation || m_data == _i.m_data)); }
void setLocation(SourceLocation const& _location) { m_location = _location; }
SourceLocation const& location() const { return m_location; }
@@ -108,6 +111,8 @@ public:
void setPushedValue(u256 const& _value) const { m_pushedValue = std::make_shared<u256>(_value); }
u256 const* pushedValue() const { return m_pushedValue.get(); }
+ std::string toAssemblyText() const;
+
private:
AssemblyItemType m_type;
u256 m_data;