Implement checked mod for sol->yul code generation.

This commit is contained in:
Daniel Kirchner
2019-06-20 12:30:32 +02:00
committed by chriseth
parent a5b9f634ef
commit fcd3410f26
5 changed files with 84 additions and 0 deletions
+4
View File
@@ -103,6 +103,10 @@ public:
/// signed division of the smallest number by -1.
std::string overflowCheckedIntDivFunction(IntegerType const& _type);
/// @returns name of function to perform modulo on integers.
/// Reverts for modulo by zero.
std::string checkedIntModFunction(IntegerType const& _type);
/// @returns computes the difference between two values.
/// Assumes the input to be in range for the type.
/// signature: (x, y) -> diff