aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/codegen
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2017-02-07 06:11:19 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2017-02-11 06:40:42 +0800
commitf3158f92d6070b6088c6a1b32f2934b9cd7dde1b (patch)
tree06ce91bd693a16055aaba7437d60b6f68fa51fb4 /libsolidity/codegen
parent148f9233516ff5ad94d81aba9bc9c0440d3afc7b (diff)
downloaddexon-solidity-f3158f92d6070b6088c6a1b32f2934b9cd7dde1b.tar.gz
dexon-solidity-f3158f92d6070b6088c6a1b32f2934b9cd7dde1b.tar.zst
dexon-solidity-f3158f92d6070b6088c6a1b32f2934b9cd7dde1b.zip
Support revert()
Diffstat (limited to 'libsolidity/codegen')
-rw-r--r--libsolidity/codegen/ExpressionCompiler.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/libsolidity/codegen/ExpressionCompiler.cpp b/libsolidity/codegen/ExpressionCompiler.cpp
index f69d61db..316ae888 100644
--- a/libsolidity/codegen/ExpressionCompiler.cpp
+++ b/libsolidity/codegen/ExpressionCompiler.cpp
@@ -650,6 +650,11 @@ bool ExpressionCompiler::visit(FunctionCall const& _functionCall)
utils().convertType(*arguments.front()->annotation().type, *function.parameterTypes().front(), true);
m_context << Instruction::SELFDESTRUCT;
break;
+ case Location::Revert:
+ // memory offset returned - zero length
+ m_context << u256(0) << u256(0);
+ m_context << Instruction::REVERT;
+ break;
case Location::SHA3:
{
TypePointers argumentTypes;