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

Method appendYulUtilityFunctions

libsolidity/codegen/CompilerContext.cpp:192–210  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

190}
191
192void CompilerContext::appendYulUtilityFunctions(OptimiserSettings const& _optimiserSettings)
193{
194 solAssert(!m_appendYulUtilityFunctionsRan, "requestedYulFunctions called more than once.");
195 m_appendYulUtilityFunctionsRan = true;
196
197 std::string code = m_yulFunctionCollector.requestedFunctions();
198 if (!code.empty())
199 {
200 appendInlineAssembly(
201 yul::reindent("{\n" + std::move(code) + "\n}"),
202 {},
203 m_externallyUsedYulFunctions,
204 true,
205 _optimiserSettings,
206 yulUtilityFileName()
207 );
208 solAssert(!m_generatedYulUtilityCode.empty(), "");
209 }
210}
211
212void CompilerContext::addVariable(
213 VariableDeclaration const& _declaration,

Callers 2

compileFirstExpressionFunction · 0.80

Calls 2

requestedFunctionsMethod · 0.80
emptyMethod · 0.45

Tested by

no test coverage detected