| 170 | } |
| 171 | |
| 172 | void 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 | |
| 192 | void CompilerContext::appendYulUtilityFunctions(OptimiserSettings const& _optimiserSettings) |
| 193 | { |
no test coverage detected