diff --git a/libsolidity/Compiler.h b/libsolidity/Compiler.h index 67f3a18eb..3ad2d8c61 100644 --- a/libsolidity/Compiler.h +++ b/libsolidity/Compiler.h @@ -26,6 +26,7 @@ #include #include #include +#include namespace dev { namespace solidity { @@ -41,9 +42,11 @@ public: bytes getAssembledBytecode() { return m_context.getAssembledBytecode(m_optimize); } bytes getRuntimeBytecode() { return m_runtimeContext.getAssembledBytecode(m_optimize);} void streamAssembly(std::ostream& _stream) const { m_context.streamAssembly(_stream); } - /// Getters for compiler contexts. Only for testing purposes. - CompilerContext const& getContext() const { return m_context; } - CompilerContext const& getRuntimeContext() const { return m_runtimeContext; } + + /// @returns Assembly items of the normal compiler context + eth::AssemblyItems const& getAssemblyItems() const { return m_context.getAssembly().getItems(); } + /// @returns Assembly items of the runtime compiler context + eth::AssemblyItems const& getRuntimeAssemblyItems() const { return m_runtimeContext.getAssembly().getItems(); } private: /// Registers the non-function objects inside the contract with the context. diff --git a/test/Assembly.cpp b/test/Assembly.cpp index 60f10d08f..1837feacc 100644 --- a/test/Assembly.cpp +++ b/test/Assembly.cpp @@ -64,7 +64,7 @@ eth::AssemblyItems compileContract(const string& _sourceCode) Compiler compiler; compiler.compileContract(*contract, map{}); - return compiler.getRuntimeContext().getAssembly().getItems(); + return compiler.getRuntimeAssemblyItems(); } BOOST_FAIL("No contract found in source."); return AssemblyItems();