diff options
Diffstat (limited to 'libsolidity/codegen/CompilerUtils.h')
-rw-r--r-- | libsolidity/codegen/CompilerUtils.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/libsolidity/codegen/CompilerUtils.h b/libsolidity/codegen/CompilerUtils.h index a88951bc..0ee053a9 100644 --- a/libsolidity/codegen/CompilerUtils.h +++ b/libsolidity/codegen/CompilerUtils.h @@ -110,10 +110,12 @@ public: void zeroInitialiseMemoryArray(ArrayType const& _type); /// Copies full 32 byte words in memory (regions cannot overlap), i.e. may copy more than length. + /// Length can be zero, in this case, it copies nothing. /// Stack pre: <size> <target> <source> /// Stack post: void memoryCopy32(); /// Copies data in memory (regions cannot overlap). + /// Length can be zero, in this case, it copies nothing. /// Stack pre: <size> <target> <source> /// Stack post: void memoryCopy(); @@ -135,7 +137,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. |