aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/codegen/ContractCompiler.cpp
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2017-02-13 21:56:22 +0800
committerGitHub <noreply@github.com>2017-02-13 21:56:22 +0800
commit0d8a9c328910bc9a0ab18beb273c029dc9a05b15 (patch)
tree388b2cc84825e30c0753e480be1d6bb0bbc4db03 /libsolidity/codegen/ContractCompiler.cpp
parente2349f9d5db80e57558ddaf7564ea57cf3b216d8 (diff)
parentc8ec79548b8f8825735ee96f1768e7fc5313d19e (diff)
downloaddexon-solidity-0d8a9c328910bc9a0ab18beb273c029dc9a05b15.tar
dexon-solidity-0d8a9c328910bc9a0ab18beb273c029dc9a05b15.tar.gz
dexon-solidity-0d8a9c328910bc9a0ab18beb273c029dc9a05b15.tar.bz2
dexon-solidity-0d8a9c328910bc9a0ab18beb273c029dc9a05b15.tar.lz
dexon-solidity-0d8a9c328910bc9a0ab18beb273c029dc9a05b15.tar.xz
dexon-solidity-0d8a9c328910bc9a0ab18beb273c029dc9a05b15.tar.zst
dexon-solidity-0d8a9c328910bc9a0ab18beb273c029dc9a05b15.zip
Merge pull request #1661 from ethereum/asm-revert
Implement REVERT (EIP140)
Diffstat (limited to 'libsolidity/codegen/ContractCompiler.cpp')
-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;
}