| 151 | } |
| 152 | |
| 153 | evmasm::AssemblyItem CompilerContext::lowLevelFunctionTag( |
| 154 | std::string const& _name, |
| 155 | unsigned _inArgs, |
| 156 | unsigned _outArgs, |
| 157 | std::function<void(CompilerContext&)> const& _generator |
| 158 | ) |
| 159 | { |
| 160 | auto it = m_lowLevelFunctions.find(_name); |
| 161 | if (it == m_lowLevelFunctions.end()) |
| 162 | { |
| 163 | evmasm::AssemblyItem tag = newTag().pushTag(); |
| 164 | m_lowLevelFunctions.insert(make_pair(_name, tag)); |
| 165 | m_lowLevelFunctionGenerationQueue.push(make_tuple(_name, _inArgs, _outArgs, _generator)); |
| 166 | return tag; |
| 167 | } |
| 168 | else |
| 169 | return it->second; |
| 170 | } |
| 171 | |
| 172 | void CompilerContext::appendMissingLowLevelFunctions() |
| 173 | { |