| 197 | } |
| 198 | |
| 199 | void YulStack::reparse() |
| 200 | { |
| 201 | yulAssert(m_parserResult); |
| 202 | yulAssert(m_charStream); |
| 203 | |
| 204 | // NOTE: it is important for the source printed here to exactly match what the compiler will |
| 205 | // eventually output to the user. In particular, debug info must be exactly the same. |
| 206 | // Otherwise source locations will be off. |
| 207 | std::string source = print(); |
| 208 | |
| 209 | YulStack cleanStack( |
| 210 | m_evmVersion, |
| 211 | m_eofVersion, |
| 212 | m_optimiserSettings, |
| 213 | m_debugInfoSelection, |
| 214 | m_soliditySourceProvider, |
| 215 | m_objectOptimizer |
| 216 | ); |
| 217 | bool reanalysisSuccessful = cleanStack.parseAndAnalyze(m_charStream->name(), source); |
| 218 | yulAssert( |
| 219 | reanalysisSuccessful, |
| 220 | source + "\n\n" |
| 221 | "Invalid IR generated:\n" + |
| 222 | SourceReferenceFormatter::formatErrorInformation(cleanStack.errors(), cleanStack) + "\n" |
| 223 | ); |
| 224 | |
| 225 | m_stackState = AnalysisSuccessful; |
| 226 | m_parserResult = std::move(cleanStack.m_parserResult); |
| 227 | |
| 228 | // NOTE: We keep the char stream, and errors, even though they no longer match the object, |
| 229 | // because it's the original source that matters to the user. Optimized code may have different |
| 230 | // locations and fewer warnings. |
| 231 | } |
| 232 | |
| 233 | MachineAssemblyObject YulStack::assemble(Machine _machine, bool _viaSSACFG) |
| 234 | { |
nothing calls this directly
no test coverage detected