diff --git a/libsolidity/interface/AssemblyStack.cpp b/libsolidity/interface/AssemblyStack.cpp index 6a5e5494a..7dc1edc7a 100644 --- a/libsolidity/interface/AssemblyStack.cpp +++ b/libsolidity/interface/AssemblyStack.cpp @@ -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(assembly.assemble()); - /// TODO: fill out text representation + ostringstream tmp; + assembly.stream(tmp); + object.assembly = tmp.str(); return object; } case Machine::EVM15: diff --git a/solc/CommandLineInterface.cpp b/solc/CommandLineInterface.cpp index e755c3b55..7509d1f2c 100644 --- a/solc/CommandLineInterface.cpp +++ b/solc/CommandLineInterface.cpp @@ -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; }