Parse default dialect and omit when printing.

This commit is contained in:
chriseth
2020-01-29 17:25:25 +01:00
parent 90c98a3289
commit fbe5bb0cce
10 changed files with 27 additions and 10 deletions
+2 -2
View File
@@ -387,7 +387,7 @@ void CompilerContext::appendInlineAssembly(
yul::EVMDialect const& dialect = yul::EVMDialect::strictAssemblyForEVM(m_evmVersion);
auto parserResult = yul::Parser(errorReporter, dialect).parse(scanner, false);
#ifdef SOL_OUTPUT_ASM
cout << yul::AsmPrinter()(*parserResult) << endl;
cout << yul::AsmPrinter(&dialect)(*parserResult) << endl;
#endif
auto reportError = [&](string const& _context)
@@ -438,7 +438,7 @@ void CompilerContext::appendInlineAssembly(
#ifdef SOL_OUTPUT_ASM
cout << "After optimizer:" << endl;
cout << yul::AsmPrinter()(*parserResult) << endl;
cout << yul::AsmPrinter(&dialect)(*parserResult) << endl;
#endif
}
@@ -892,6 +892,7 @@ bool IRGeneratorForStatements::visit(InlineAssembly const& _inlineAsm)
solAssert(holds_alternative<yul::Block>(modified), "");
// Do not provide dialect so that we get the full type information.
m_code << yul::AsmPrinter()(std::get<yul::Block>(std::move(modified))) << "\n";
return false;
}