[SolYul] Division.

This commit is contained in:
chriseth
2019-05-27 17:53:46 +02:00
parent b836079006
commit fbf189151d
4 changed files with 73 additions and 10 deletions
+6
View File
@@ -36,6 +36,7 @@ namespace solidity
class Type;
class ArrayType;
class MappingType;
class IntegerType;
/**
* Component that can generate various useful Yul functions.
@@ -88,6 +89,11 @@ public:
std::string overflowCheckedUIntMulFunction(size_t _bits);
/// @returns name of function to perform division on integers.
/// Checks for division by zero and the special case of
/// signed division of the smallest number by -1.
std::string overflowCheckedIntDivFunction(IntegerType const& _type);
/// @returns computes the difference between two values.
/// Assumes the input to be in range for the type.
std::string overflowCheckedUIntSubFunction();