| 762 | } |
| 763 | |
| 764 | std::string YulUtilFunctions::wrappingIntAddFunction(IntegerType const& _type) |
| 765 | { |
| 766 | std::string functionName = "wrapping_add_" + _type.identifier(); |
| 767 | return m_functionCollector.createFunction(functionName, [&]() { |
| 768 | return |
| 769 | Whiskers(R"( |
| 770 | function <functionName>(x, y) -> sum { |
| 771 | sum := <cleanupFunction>(add(x, y)) |
| 772 | } |
| 773 | )") |
| 774 | ("functionName", functionName) |
| 775 | ("cleanupFunction", cleanupFunction(_type)) |
| 776 | .render(); |
| 777 | }); |
| 778 | } |
| 779 | |
| 780 | std::string YulUtilFunctions::overflowCheckedIntMulFunction(IntegerType const& _type) |
| 781 | { |
no test coverage detected