MCPcopy Create free account
hub / github.com/argotorg/solidity / wrappingIntAddFunction

Method wrappingIntAddFunction

libsolidity/codegen/YulUtilFunctions.cpp:764–778  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

762}
763
764std::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
780std::string YulUtilFunctions::overflowCheckedIntMulFunction(IntegerType const& _type)
781{

Callers 1

binaryOperationMethod · 0.80

Calls 4

WhiskersClass · 0.85
identifierMethod · 0.80
renderMethod · 0.80
createFunctionMethod · 0.45

Tested by

no test coverage detected