aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/codegen/CompilerUtils.h
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2017-05-24 17:47:43 +0800
committerchriseth <chris@ethereum.org>2017-06-24 01:29:11 +0800
commit831ed083875b73faf91f9d3335e2599540366712 (patch)
tree9483dd02d12267cab05078f140b094ad40841a14 /libsolidity/codegen/CompilerUtils.h
parentb83f77e0e567b58c2ada831e526ad5bacfed8b40 (diff)
downloaddexon-solidity-831ed083875b73faf91f9d3335e2599540366712.tar
dexon-solidity-831ed083875b73faf91f9d3335e2599540366712.tar.gz
dexon-solidity-831ed083875b73faf91f9d3335e2599540366712.tar.bz2
dexon-solidity-831ed083875b73faf91f9d3335e2599540366712.tar.lz
dexon-solidity-831ed083875b73faf91f9d3335e2599540366712.tar.xz
dexon-solidity-831ed083875b73faf91f9d3335e2599540366712.tar.zst
dexon-solidity-831ed083875b73faf91f9d3335e2599540366712.zip
Change invalid opcode to revert for input validation.
Diffstat (limited to 'libsolidity/codegen/CompilerUtils.h')
-rw-r--r--libsolidity/codegen/CompilerUtils.h10
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.