diff options
author | Christian <c@ethdev.com> | 2014-12-17 23:23:18 +0800 |
---|---|---|
committer | Christian <c@ethdev.com> | 2014-12-17 23:24:56 +0800 |
commit | 5a1a83ff42b97f85e06c54c7d5fe7db2f8239e5a (patch) | |
tree | 3aaf794ca4352fedfb7b651a5722b3ff2a588e1b /CompilerUtils.cpp | |
parent | 3d98ec1323f604130c0dba87ce4596f04ffa0269 (diff) | |
download | dexon-solidity-5a1a83ff42b97f85e06c54c7d5fe7db2f8239e5a.tar dexon-solidity-5a1a83ff42b97f85e06c54c7d5fe7db2f8239e5a.tar.gz dexon-solidity-5a1a83ff42b97f85e06c54c7d5fe7db2f8239e5a.tar.bz2 dexon-solidity-5a1a83ff42b97f85e06c54c7d5fe7db2f8239e5a.tar.lz dexon-solidity-5a1a83ff42b97f85e06c54c7d5fe7db2f8239e5a.tar.xz dexon-solidity-5a1a83ff42b97f85e06c54c7d5fe7db2f8239e5a.tar.zst dexon-solidity-5a1a83ff42b97f85e06c54c7d5fe7db2f8239e5a.zip |
Assertions that throw InternalCompilerErrors.
Diffstat (limited to 'CompilerUtils.cpp')
-rw-r--r-- | CompilerUtils.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/CompilerUtils.cpp b/CompilerUtils.cpp index 9f474896..680e9190 100644 --- a/CompilerUtils.cpp +++ b/CompilerUtils.cpp @@ -39,8 +39,7 @@ void CompilerUtils::loadFromMemory(unsigned _offset, unsigned _bytes, bool _left return; } eth::Instruction load = _fromCalldata ? eth::Instruction::CALLDATALOAD : eth::Instruction::MLOAD; - if (asserts(_bytes <= 32)) - BOOST_THROW_EXCEPTION(InternalCompilerError() << errinfo_comment("Memory load of more than 32 bytes requested.")); + solAssert(_bytes <= 32, "Memory load of more than 32 bytes requested."); if (_bytes == 32) m_context << u256(_offset) << load; else @@ -63,8 +62,7 @@ void CompilerUtils::storeInMemory(unsigned _offset, unsigned _bytes, bool _leftA m_context << eth::Instruction::POP; return; } - if (asserts(_bytes <= 32)) - BOOST_THROW_EXCEPTION(InternalCompilerError() << errinfo_comment("Memory store of more than 32 bytes requested.")); + solAssert(_bytes <= 32, "Memory store of more than 32 bytes requested."); if (_bytes != 32 && !_leftAligned) // shift the value accordingly before storing m_context << (u256(1) << ((32 - _bytes) * 8)) << eth::Instruction::MUL; |