mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Introduce MachineAssemblyObject
This commit is contained in:
committed by
chriseth
parent
fe3b46554a
commit
f0d213e6b5
@@ -1082,9 +1082,10 @@ bool CommandLineInterface::assemble(
|
||||
"eWasm";
|
||||
cout << endl << "======= " << src.first << " (" << machine << ") =======" << endl;
|
||||
AssemblyStack& stack = assemblyStacks[src.first];
|
||||
MachineAssemblyObject object;
|
||||
try
|
||||
{
|
||||
cout << stack.assemble(_targetMachine).toHex() << endl;
|
||||
object = stack.assemble(_targetMachine);
|
||||
}
|
||||
catch (Exception const& _exception)
|
||||
{
|
||||
@@ -1096,6 +1097,10 @@ bool CommandLineInterface::assemble(
|
||||
cerr << "Unknown exception while assembling." << endl;
|
||||
return false;
|
||||
}
|
||||
if (object.bytecode)
|
||||
cout << object.bytecode->toHex() << endl;
|
||||
else
|
||||
cerr << "No binary representation found." << endl;
|
||||
cout << stack.print() << endl;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user