diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2017-05-30 06:50:46 +0800 |
---|---|---|
committer | chriseth <chris@ethereum.org> | 2017-06-09 22:40:14 +0800 |
commit | f0d213e6b56da5be8088008bf2ceadb7fd0030f7 (patch) | |
tree | 1e53cb0fef34276b90f2768ac107ebf831ac2c87 /libsolidity/interface/AssemblyStack.cpp | |
parent | fe3b46554af07b35f84ca48264830f8c27d4e52e (diff) | |
download | dexon-solidity-f0d213e6b56da5be8088008bf2ceadb7fd0030f7.tar dexon-solidity-f0d213e6b56da5be8088008bf2ceadb7fd0030f7.tar.gz dexon-solidity-f0d213e6b56da5be8088008bf2ceadb7fd0030f7.tar.bz2 dexon-solidity-f0d213e6b56da5be8088008bf2ceadb7fd0030f7.tar.lz dexon-solidity-f0d213e6b56da5be8088008bf2ceadb7fd0030f7.tar.xz dexon-solidity-f0d213e6b56da5be8088008bf2ceadb7fd0030f7.tar.zst dexon-solidity-f0d213e6b56da5be8088008bf2ceadb7fd0030f7.zip |
Introduce MachineAssemblyObject
Diffstat (limited to 'libsolidity/interface/AssemblyStack.cpp')
-rw-r--r-- | libsolidity/interface/AssemblyStack.cpp | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/libsolidity/interface/AssemblyStack.cpp b/libsolidity/interface/AssemblyStack.cpp index 75877881..6a5e5494 100644 --- a/libsolidity/interface/AssemblyStack.cpp +++ b/libsolidity/interface/AssemblyStack.cpp @@ -77,7 +77,7 @@ bool AssemblyStack::analyzeParsed() return m_analysisSuccessful; } -eth::LinkerObject AssemblyStack::assemble(Machine _machine) const +MachineAssemblyObject AssemblyStack::assemble(Machine _machine) const { solAssert(m_analysisSuccessful, ""); solAssert(m_parserResult, ""); @@ -87,21 +87,27 @@ eth::LinkerObject AssemblyStack::assemble(Machine _machine) const { case Machine::EVM: { + MachineAssemblyObject object; eth::Assembly assembly; assembly::CodeGenerator::assemble(*m_parserResult, *m_analysisInfo, assembly); - return assembly.assemble(); + object.bytecode = make_shared<eth::LinkerObject>(assembly.assemble()); + /// TODO: fill out text representation + return object; } case Machine::EVM15: { + MachineAssemblyObject object; julia::EVMAssembly assembly(true); julia::CodeTransform(assembly, *m_analysisInfo, true).run(*m_parserResult); - return assembly.finalize(); + object.bytecode = make_shared<eth::LinkerObject>(assembly.finalize()); + /// TOOD: fill out text representation + return object; } case Machine::eWasm: solUnimplemented("eWasm backend is not yet implemented."); } // unreachable - return eth::LinkerObject(); + return MachineAssemblyObject(); } string AssemblyStack::print() const |