Supply text representation of assembly

This commit is contained in:
Alex Beregszaszi 2017-05-29 23:58:03 +01:00 committed by chriseth
parent f0d213e6b5
commit ca92bda886
2 changed files with 7 additions and 1 deletions

View File

@ -91,7 +91,9 @@ MachineAssemblyObject AssemblyStack::assemble(Machine _machine) const
eth::Assembly assembly;
assembly::CodeGenerator::assemble(*m_parserResult, *m_analysisInfo, assembly);
object.bytecode = make_shared<eth::LinkerObject>(assembly.assemble());
/// TODO: fill out text representation
ostringstream tmp;
assembly.stream(tmp);
object.assembly = tmp.str();
return object;
}
case Machine::EVM15:

View File

@ -1101,6 +1101,10 @@ bool CommandLineInterface::assemble(
cout << object.bytecode->toHex() << endl;
else
cerr << "No binary representation found." << endl;
if (!object.assembly.empty())
cout << object.assembly << endl;
else
cerr << "No text representation found." << endl;
cout << stack.print() << endl;
}