aboutsummaryrefslogtreecommitdiffstats
path: root/libevmasm/AssemblyItem.h
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2017-01-11 00:56:58 +0800
committerGitHub <noreply@github.com>2017-01-11 00:56:58 +0800
commit26a90af4d2ffb6a78056cc825f490096e4cc7176 (patch)
treedacca2f4334d027525ab2e535d8837ea6872241d /libevmasm/AssemblyItem.h
parent354a10be36e507319faa72f691d441c06d75da6b (diff)
parentceac5c5a0c75e92040749e4dca794b2a07a431f0 (diff)
downloaddexon-solidity-26a90af4d2ffb6a78056cc825f490096e4cc7176.tar
dexon-solidity-26a90af4d2ffb6a78056cc825f490096e4cc7176.tar.gz
dexon-solidity-26a90af4d2ffb6a78056cc825f490096e4cc7176.tar.bz2
dexon-solidity-26a90af4d2ffb6a78056cc825f490096e4cc7176.tar.lz
dexon-solidity-26a90af4d2ffb6a78056cc825f490096e4cc7176.tar.xz
dexon-solidity-26a90af4d2ffb6a78056cc825f490096e4cc7176.tar.zst
dexon-solidity-26a90af4d2ffb6a78056cc825f490096e4cc7176.zip
Merge pull request #1330 from ethereum/assemblyDef
Assembly definition.
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;