diff options
author | chriseth <c@ethdev.com> | 2017-01-24 08:09:10 +0800 |
---|---|---|
committer | chriseth <c@ethdev.com> | 2017-01-24 08:09:55 +0800 |
commit | 997f5d751a21263b1f104d547486abca3ee3bff6 (patch) | |
tree | f509018263427961284f6c89b4a309edd1cae6f2 /libevmasm/AssemblyItem.cpp | |
parent | c5a501addd2c339621af76db86bcf87c7111fc8d (diff) | |
download | dexon-solidity-997f5d751a21263b1f104d547486abca3ee3bff6.tar.gz dexon-solidity-997f5d751a21263b1f104d547486abca3ee3bff6.tar.zst dexon-solidity-997f5d751a21263b1f104d547486abca3ee3bff6.zip |
Create functional assembly output, if possible.
Diffstat (limited to 'libevmasm/AssemblyItem.cpp')
-rw-r--r-- | libevmasm/AssemblyItem.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/libevmasm/AssemblyItem.cpp b/libevmasm/AssemblyItem.cpp index 6c7d5425..26d9fded 100644 --- a/libevmasm/AssemblyItem.cpp +++ b/libevmasm/AssemblyItem.cpp @@ -76,12 +76,20 @@ unsigned AssemblyItem::bytesRequired(unsigned _addressLength) const BOOST_THROW_EXCEPTION(InvalidOpcode()); } -int AssemblyItem::deposit() const +int AssemblyItem::arguments() const +{ + if (type() == Operation) + return instructionInfo(instruction()).args; + else + return 0; +} + +int AssemblyItem::returnValues() const { switch (m_type) { case Operation: - return instructionInfo(instruction()).ret - instructionInfo(instruction()).args; + return instructionInfo(instruction()).ret; case Push: case PushString: case PushTag: |