From dfb7d5ebd955d390142241a2abcb95995ef1ba04 Mon Sep 17 00:00:00 2001 From: chriseth Date: Wed, 12 Apr 2017 18:32:25 +0200 Subject: Move analysis out of code generator. --- libsolidity/inlineasm/AsmCodeGen.h | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) (limited to 'libsolidity/inlineasm/AsmCodeGen.h') diff --git a/libsolidity/inlineasm/AsmCodeGen.h b/libsolidity/inlineasm/AsmCodeGen.h index ed61a7eb..18165cbd 100644 --- a/libsolidity/inlineasm/AsmCodeGen.h +++ b/libsolidity/inlineasm/AsmCodeGen.h @@ -22,8 +22,8 @@ #pragma once +#include #include -#include #include @@ -42,15 +42,23 @@ struct Block; class CodeGenerator { public: - CodeGenerator(Block const& _parsedData, ErrorList& _errors): - m_parsedData(_parsedData), m_errors(_errors) {} + CodeGenerator(ErrorList& _errors): + m_errors(_errors) {} /// Performs code generation and @returns the result. - eth::Assembly assemble(ExternalIdentifierAccess const& _identifierAccess = ExternalIdentifierAccess()); + eth::Assembly assemble( + Block const& _parsedData, + AsmAnalyzer::Scopes& _scopes, + ExternalIdentifierAccess const& _identifierAccess = ExternalIdentifierAccess() + ); /// Performs code generation and appends generated to to _assembly. - void assemble(eth::Assembly& _assembly, ExternalIdentifierAccess const& _identifierAccess = ExternalIdentifierAccess()); + void assemble( + Block const& _parsedData, + AsmAnalyzer::Scopes& _scopes, + eth::Assembly& _assembly, + ExternalIdentifierAccess const& _identifierAccess = ExternalIdentifierAccess() + ); private: - Block const& m_parsedData; ErrorList& m_errors; }; -- cgit