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

Method wrappingIntMulFunction

libsolidity/codegen/YulUtilFunctions.cpp:834–848  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

832}
833
834std::string YulUtilFunctions::wrappingIntMulFunction(IntegerType const& _type)
835{
836 std::string functionName = "wrapping_mul_" + _type.identifier();
837 return m_functionCollector.createFunction(functionName, [&]() {
838 return
839 Whiskers(R"(
840 function <functionName>(x, y) -> product {
841 product := <cleanupFunction>(mul(x, y))
842 }
843 )")
844 ("functionName", functionName)
845 ("cleanupFunction", cleanupFunction(_type))
846 .render();
847 });
848}
849
850std::string YulUtilFunctions::overflowCheckedIntDivFunction(IntegerType const& _type)
851{

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