diff options
author | chriseth <chris@ethereum.org> | 2017-04-13 00:32:25 +0800 |
---|---|---|
committer | chriseth <chris@ethereum.org> | 2017-04-25 22:49:04 +0800 |
commit | dfb7d5ebd955d390142241a2abcb95995ef1ba04 (patch) | |
tree | 6a6c4bf8091fd8d6e60272f9fb94b9b38fda4530 /libsolidity/inlineasm/AsmCodeGen.h | |
parent | 4afd54b23594563036498943087bcd06ef021f94 (diff) | |
download | dexon-solidity-dfb7d5ebd955d390142241a2abcb95995ef1ba04.tar.gz dexon-solidity-dfb7d5ebd955d390142241a2abcb95995ef1ba04.tar.zst dexon-solidity-dfb7d5ebd955d390142241a2abcb95995ef1ba04.zip |
Move analysis out of code generator.
Diffstat (limited to 'libsolidity/inlineasm/AsmCodeGen.h')
-rw-r--r-- | libsolidity/inlineasm/AsmCodeGen.h | 20 |
1 files changed, 14 insertions, 6 deletions
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 <libsolidity/inlineasm/AsmAnalysis.h> #include <libsolidity/interface/Exceptions.h> -#include <libsolidity/inlineasm/AsmStack.h> #include <functional> @@ -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; }; |