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

Method appendMissingLowLevelFunctions

libsolidity/codegen/CompilerContext.cpp:172–190  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

170}
171
172void CompilerContext::appendMissingLowLevelFunctions()
173{
174 while (!m_lowLevelFunctionGenerationQueue.empty())
175 {
176 std::string name;
177 unsigned inArgs;
178 unsigned outArgs;
179 std::function<void(CompilerContext&)> generator;
180 tie(name, inArgs, outArgs, generator) = m_lowLevelFunctionGenerationQueue.front();
181 m_lowLevelFunctionGenerationQueue.pop();
182
183 setStackOffset(static_cast<int>(inArgs) + 1);
184 *this << m_lowLevelFunctions.at(name).tag();
185 generator(*this);
186 CompilerUtils(*this).moveToStackTop(outArgs);
187 appendJump(evmasm::AssemblyItem::JumpType::OutOfFunction);
188 solAssert(stackHeight() == outArgs, "Invalid stack height in low-level function " + name + ".");
189 }
190}
191
192void CompilerContext::appendYulUtilityFunctions(OptimiserSettings const& _optimiserSettings)
193{

Callers 2

compileFirstExpressionFunction · 0.80

Calls 6

tagMethod · 0.80
atMethod · 0.80
moveToStackTopMethod · 0.80
CompilerUtilsClass · 0.70
emptyMethod · 0.45
popMethod · 0.45

Tested by

no test coverage detected