aboutsummaryrefslogtreecommitdiffstats
path: root/libevmasm/Assembly.cpp
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2017-06-22 19:38:46 +0800
committerGitHub <noreply@github.com>2017-06-22 19:38:46 +0800
commita95f057e37b746359a7426e95da32e3236f0603a (patch)
treee7c7b00393570752b461cbf768fa0ea53e18fee5 /libevmasm/Assembly.cpp
parentde7a488f82217118d698f4cd6028826f12cbad8b (diff)
parentd5f8ce90c7a76870e5a9d0fe6f9fd709a7383572 (diff)
downloaddexon-solidity-a95f057e37b746359a7426e95da32e3236f0603a.tar
dexon-solidity-a95f057e37b746359a7426e95da32e3236f0603a.tar.gz
dexon-solidity-a95f057e37b746359a7426e95da32e3236f0603a.tar.bz2
dexon-solidity-a95f057e37b746359a7426e95da32e3236f0603a.tar.lz
dexon-solidity-a95f057e37b746359a7426e95da32e3236f0603a.tar.xz
dexon-solidity-a95f057e37b746359a7426e95da32e3236f0603a.tar.zst
dexon-solidity-a95f057e37b746359a7426e95da32e3236f0603a.zip
Merge pull request #2438 from ethereum/exceptions-cleanup
Cleanup assertions/exceptions includes
Diffstat (limited to 'libevmasm/Assembly.cpp')
-rw-r--r--libevmasm/Assembly.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/libevmasm/Assembly.cpp b/libevmasm/Assembly.cpp
index 606714d2..27199b7b 100644
--- a/libevmasm/Assembly.cpp
+++ b/libevmasm/Assembly.cpp
@@ -59,14 +59,11 @@ void Assembly::append(Assembly const& _a)
void Assembly::append(Assembly const& _a, int _deposit)
{
- if (_deposit > _a.m_deposit)
- BOOST_THROW_EXCEPTION(InvalidDeposit());
- else
- {
- append(_a);
- while (_deposit++ < _a.m_deposit)
- append(Instruction::POP);
- }
+ assertThrow(_deposit <= _a.m_deposit, InvalidDeposit, "");
+
+ append(_a);
+ while (_deposit++ < _a.m_deposit)
+ append(Instruction::POP);
}
unsigned Assembly::bytesRequired(unsigned subTagSize) const