mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
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.
This commit is contained in:
1 parent
102fd7ee5d
commit
9bcbd93ac5
10 files changed
+49
-17
No files matched your search
@@ -215,6 +215,18 @@ CompilerContext& CompilerContext::appendJump(eth::AssemblyItem::JumpType _jumpTy
|
||||
return *this << item;
|
||||
}
|
||||
|
||||
CompilerContext& CompilerContext::appendInvalid()
|
||||
{
|
||||
return *this << Instruction::INVALID;
|
||||
}
|
||||
|
||||
CompilerContext& CompilerContext::appendConditionalInvalid()
|
||||
{
|
||||
eth::AssemblyItem falseTag = appendConditionalJump();
|
||||
eth::AssemblyItem endTag = appendJumpToNew();
|
||||
return *this << falseTag << Instruction::INVALID << endTag;
|
||||
}
|
||||
|
||||
void CompilerContext::resetVisitedNodes(ASTNode const* _node)
|
||||
{
|
||||
stack<ASTNode const*> newStack;
|
||||
|
||||
Reference in new issue
Block a user