mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Tighter coupling for Assembly items retrieval
- Exposing only assembly items, not the entire compiler context
This commit is contained in:
parent
71b0d8107a
commit
ece19cb913
@ -26,6 +26,7 @@
|
||||
#include <functional>
|
||||
#include <libsolidity/ASTVisitor.h>
|
||||
#include <libsolidity/CompilerContext.h>
|
||||
#include <libevmcore/Assembly.h>
|
||||
|
||||
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.
|
||||
|
Loading…
Reference in New Issue
Block a user