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

Method appendExpOperatorCode

libsolidity/codegen/ExpressionCompiler.cpp:2717–2730  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2715}
2716
2717void ExpressionCompiler::appendExpOperatorCode(Type const& _valueType, Type const& _exponentType)
2718{
2719 solAssert(_valueType.category() == Type::Category::Integer, "");
2720 solAssert(!dynamic_cast<IntegerType const&>(_exponentType).isSigned(), "");
2721
2722
2723 if (m_context.arithmetic() == Arithmetic::Checked)
2724 m_context.callYulFunction(m_context.utilFunctions().overflowCheckedIntExpFunction(
2725 dynamic_cast<IntegerType const&>(_valueType),
2726 dynamic_cast<IntegerType const&>(_exponentType)
2727 ), 2, 1);
2728 else
2729 m_context << Instruction::EXP;
2730}
2731
2732void ExpressionCompiler::appendExternalFunctionCall(
2733 FunctionType const& _functionType,

Callers

nothing calls this directly

Calls 5

callYulFunctionMethod · 0.80
categoryMethod · 0.45
isSignedMethod · 0.45
arithmeticMethod · 0.45

Tested by

no test coverage detected