aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/codegen/CompilerContext.h
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2017-06-26 07:06:20 +0800
committerGitHub <noreply@github.com>2017-06-26 07:06:20 +0800
commit29b8cdb594044525b398994fe9855fbbdb76981b (patch)
tree4d3b3a3706c4a89194f728cca37a6c457c5857fb /libsolidity/codegen/CompilerContext.h
parentb83f77e0e567b58c2ada831e526ad5bacfed8b40 (diff)
parent784b72bb72631f134fbbc0cc3b7acc109dd3f785 (diff)
downloaddexon-solidity-29b8cdb594044525b398994fe9855fbbdb76981b.tar
dexon-solidity-29b8cdb594044525b398994fe9855fbbdb76981b.tar.gz
dexon-solidity-29b8cdb594044525b398994fe9855fbbdb76981b.tar.bz2
dexon-solidity-29b8cdb594044525b398994fe9855fbbdb76981b.tar.lz
dexon-solidity-29b8cdb594044525b398994fe9855fbbdb76981b.tar.xz
dexon-solidity-29b8cdb594044525b398994fe9855fbbdb76981b.tar.zst
dexon-solidity-29b8cdb594044525b398994fe9855fbbdb76981b.zip
Merge pull request #2298 from ethereum/fixThrowRevert
Change invalid opcode to revert for input validation.
Diffstat (limited to 'libsolidity/codegen/CompilerContext.h')
-rw-r--r--libsolidity/codegen/CompilerContext.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/libsolidity/codegen/CompilerContext.h b/libsolidity/codegen/CompilerContext.h
index 030b35a6..1968c1e1 100644
--- a/libsolidity/codegen/CompilerContext.h
+++ b/libsolidity/codegen/CompilerContext.h
@@ -136,11 +136,15 @@ public:
/// Appends a JUMP to a new tag and @returns the tag
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);
+ CompilerContext& appendJump(eth::AssemblyItem::JumpType _jumpType = eth::AssemblyItem::JumpType::Ordinary);
/// Appends an INVALID instruction
- CompilerContext& appendInvalid();
+ CompilerContext& appendInvalid();
/// Appends a conditional INVALID instruction
- CompilerContext& appendConditionalInvalid();
+ CompilerContext& appendConditionalInvalid();
+ /// Appends a REVERT(0, 0) call
+ CompilerContext& appendRevert();
+ /// Appends a conditional REVERT(0, 0) call
+ CompilerContext& appendConditionalRevert();
/// Appends a JUMP to a specific tag
CompilerContext& appendJumpTo(eth::AssemblyItem const& _tag) { m_asm->appendJump(_tag); return *this; }
/// Appends pushing of a new tag and @returns the new tag.