diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2017-06-26 07:06:20 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-26 07:06:20 +0800 |
commit | 29b8cdb594044525b398994fe9855fbbdb76981b (patch) | |
tree | 4d3b3a3706c4a89194f728cca37a6c457c5857fb /libsolidity/codegen/CompilerUtils.h | |
parent | b83f77e0e567b58c2ada831e526ad5bacfed8b40 (diff) | |
parent | 784b72bb72631f134fbbc0cc3b7acc109dd3f785 (diff) | |
download | dexon-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/CompilerUtils.h')
-rw-r--r-- | libsolidity/codegen/CompilerUtils.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/libsolidity/codegen/CompilerUtils.h b/libsolidity/codegen/CompilerUtils.h index a88951bc..caf2cdc2 100644 --- a/libsolidity/codegen/CompilerUtils.h +++ b/libsolidity/codegen/CompilerUtils.h @@ -135,7 +135,15 @@ public: /// If @a _cleanupNeeded, high order bits cleanup is also done if no type conversion would be /// necessary. /// If @a _chopSignBits, the function resets the signed bits out of the width of the signed integer. - void convertType(Type const& _typeOnStack, Type const& _targetType, bool _cleanupNeeded = false, bool _chopSignBits = false); + /// If @a _asPartOfArgumentDecoding is true, failed conversions are flagged via REVERT, + /// otherwise they are flagged with INVALID. + void convertType( + Type const& _typeOnStack, + Type const& _targetType, + bool _cleanupNeeded = false, + bool _chopSignBits = false, + bool _asPartOfArgumentDecoding = false + ); /// Creates a zero-value for the given type and puts it onto the stack. This might allocate /// memory for memory references. |