aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2017-02-09 07:16:47 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2017-02-11 06:41:09 +0800
commit586d156f33c78469f3272b4e8b8eae4f6229d04e (patch)
tree97c75c688be9dc418c700fed4a761628a0393227 /libsolidity
parent1fcad8b4ab48f63504c69c24372fb34f34a79436 (diff)
downloaddexon-solidity-586d156f33c78469f3272b4e8b8eae4f6229d04e.tar.gz
dexon-solidity-586d156f33c78469f3272b4e8b8eae4f6229d04e.tar.zst
dexon-solidity-586d156f33c78469f3272b4e8b8eae4f6229d04e.zip
Use the REVERT opcode for throw;
Diffstat (limited to 'libsolidity')
-rw-r--r--libsolidity/codegen/ContractCompiler.cpp4
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;
}