aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/codegen
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2018-02-23 05:42:04 +0800
committerGitHub <noreply@github.com>2018-02-23 05:42:04 +0800
commit2b62c201be166222f05acfa8422b1968f2cf924a (patch)
tree501613fa210a9c0f9e74f1f277ccb6a117d5c639 /libsolidity/codegen
parent97d1c70491c027051feac065c827b223ce6acf11 (diff)
parentb5a3b6a4293537c843e8387ffd0b03253160dc0a (diff)
downloaddexon-solidity-2b62c201be166222f05acfa8422b1968f2cf924a.tar
dexon-solidity-2b62c201be166222f05acfa8422b1968f2cf924a.tar.gz
dexon-solidity-2b62c201be166222f05acfa8422b1968f2cf924a.tar.bz2
dexon-solidity-2b62c201be166222f05acfa8422b1968f2cf924a.tar.lz
dexon-solidity-2b62c201be166222f05acfa8422b1968f2cf924a.tar.xz
dexon-solidity-2b62c201be166222f05acfa8422b1968f2cf924a.tar.zst
dexon-solidity-2b62c201be166222f05acfa8422b1968f2cf924a.zip
Merge pull request #3538 from ethereum/emitEvents
emit pseudo-keyword for events.
Diffstat (limited to 'libsolidity/codegen')
-rw-r--r--libsolidity/codegen/ContractCompiler.cpp9
-rw-r--r--libsolidity/codegen/ContractCompiler.h1
2 files changed, 10 insertions, 0 deletions
diff --git a/libsolidity/codegen/ContractCompiler.cpp b/libsolidity/codegen/ContractCompiler.cpp
index f463db94..ebb718a5 100644
--- a/libsolidity/codegen/ContractCompiler.cpp
+++ b/libsolidity/codegen/ContractCompiler.cpp
@@ -903,6 +903,15 @@ bool ContractCompiler::visit(Throw const& _throw)
return false;
}
+bool ContractCompiler::visit(EmitStatement const& _emit)
+{
+ CompilerContext::LocationSetter locationSetter(m_context, _emit);
+ StackHeightChecker checker(m_context);
+ compileExpression(_emit.eventCall());
+ checker.check();
+ return false;
+}
+
bool ContractCompiler::visit(VariableDeclarationStatement const& _variableDeclarationStatement)
{
StackHeightChecker checker(m_context);
diff --git a/libsolidity/codegen/ContractCompiler.h b/libsolidity/codegen/ContractCompiler.h
index 1fd80d05..d698dc71 100644
--- a/libsolidity/codegen/ContractCompiler.h
+++ b/libsolidity/codegen/ContractCompiler.h
@@ -109,6 +109,7 @@ private:
virtual bool visit(Break const& _breakStatement) override;
virtual bool visit(Return const& _return) override;
virtual bool visit(Throw const& _throw) override;
+ virtual bool visit(EmitStatement const& _emit) override;
virtual bool visit(VariableDeclarationStatement const& _variableDeclarationStatement) override;
virtual bool visit(ExpressionStatement const& _expressionStatement) override;
virtual bool visit(PlaceholderStatement const&) override;