diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2017-02-09 07:16:47 +0800 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2017-02-11 06:41:09 +0800 |
commit | 586d156f33c78469f3272b4e8b8eae4f6229d04e (patch) | |
tree | 97c75c688be9dc418c700fed4a761628a0393227 /libsolidity/codegen/ContractCompiler.cpp | |
parent | 1fcad8b4ab48f63504c69c24372fb34f34a79436 (diff) | |
download | dexon-solidity-586d156f33c78469f3272b4e8b8eae4f6229d04e.tar.gz dexon-solidity-586d156f33c78469f3272b4e8b8eae4f6229d04e.tar.zst dexon-solidity-586d156f33c78469f3272b4e8b8eae4f6229d04e.zip |
Use the REVERT opcode for throw;
Diffstat (limited to 'libsolidity/codegen/ContractCompiler.cpp')
-rw-r--r-- | libsolidity/codegen/ContractCompiler.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libsolidity/codegen/ContractCompiler.cpp b/libsolidity/codegen/ContractCompiler.cpp index 9d6129a3..6524bd03 100644 --- a/libsolidity/codegen/ContractCompiler.cpp +++ b/libsolidity/codegen/ContractCompiler.cpp @@ -762,7 +762,9 @@ bool ContractCompiler::visit(Return const& _return) bool ContractCompiler::visit(Throw const& _throw) { CompilerContext::LocationSetter locationSetter(m_context, _throw); - m_context.appendJumpTo(m_context.errorTag()); + // Do not send back an error detail. + m_context << u256(0) << u256(0); + m_context << Instruction::REVERT; return false; } |