aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/codegen/CompilerContext.h
diff options
context:
space:
mode:
authorValentin Wüstholz <wuestholz@gmail.com>2017-01-23 03:49:12 +0800
committerchriseth <c@ethdev.com>2017-01-26 23:39:07 +0800
commit9bcbd93ac59a19320fd56e27c58a6283f2450666 (patch)
treecf102bce6745c1e771dcacbd83a6e850a09c0054 /libsolidity/codegen/CompilerContext.h
parent102fd7ee5daeb7d7a7bb1254cf0ce71a23ad1220 (diff)
downloaddexon-solidity-9bcbd93ac59a19320fd56e27c58a6283f2450666.tar.gz
dexon-solidity-9bcbd93ac59a19320fd56e27c58a6283f2450666.tar.zst
dexon-solidity-9bcbd93ac59a19320fd56e27c58a6283f2450666.zip
Change translation of implicit throws (issue #1589).
This adds a new invalid instruction that is used for encoding implicit throws that are emitted by the compiler. This makes it possible to distinguish such runtime errors from user-provided, explicit throws.
Diffstat (limited to 'libsolidity/codegen/CompilerContext.h')
-rw-r--r--libsolidity/codegen/CompilerContext.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/libsolidity/codegen/CompilerContext.h b/libsolidity/codegen/CompilerContext.h
index f024b010..58d6cb2a 100644
--- a/libsolidity/codegen/CompilerContext.h
+++ b/libsolidity/codegen/CompilerContext.h
@@ -127,6 +127,10 @@ public:
eth::AssemblyItem appendJumpToNew() { return m_asm->appendJump().tag(); }
/// Appends a JUMP to a tag already on the stack
CompilerContext& appendJump(eth::AssemblyItem::JumpType _jumpType = eth::AssemblyItem::JumpType::Ordinary);
+ /// Appends an INVALID instruction
+ CompilerContext& appendInvalid();
+ /// Appends a conditional INVALID instruction
+ CompilerContext& appendConditionalInvalid();
/// Returns an "ErrorTag"
eth::AssemblyItem errorTag() { return m_asm->errorTag(); }
/// Appends a JUMP to a specific tag