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

Method wrappingIntSubFunction

libsolidity/codegen/YulUtilFunctions.cpp:966–980  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

964}
965
966std::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
982std::string YulUtilFunctions::overflowCheckedIntExpFunction(
983 IntegerType const& _type,

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