| 964 | } |
| 965 | |
| 966 | std::string YulUtilFunctions::wrappingIntSubFunction(IntegerType const& _type) |
| 967 | { |
| 968 | std::string functionName = "wrapping_sub_" + _type.identifier(); |
| 969 | return m_functionCollector.createFunction(functionName, [&] { |
| 970 | return |
| 971 | Whiskers(R"( |
| 972 | function <functionName>(x, y) -> diff { |
| 973 | diff := <cleanupFunction>(sub(x, y)) |
| 974 | } |
| 975 | )") |
| 976 | ("functionName", functionName) |
| 977 | ("cleanupFunction", cleanupFunction(_type)) |
| 978 | .render(); |
| 979 | }); |
| 980 | } |
| 981 | |
| 982 | std::string YulUtilFunctions::overflowCheckedIntExpFunction( |
| 983 | IntegerType const& _type, |
no test coverage detected