From 1da3af161f94b28b816fd5522795aaae3af190f3 Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Fri, 9 Jun 2017 12:45:56 +0100 Subject: Simplify CodeGenerator by remove seldom used case --- libsolidity/inlineasm/AsmCodeGen.cpp | 11 ----------- libsolidity/inlineasm/AsmCodeGen.h | 6 ------ libsolidity/interface/AssemblyStack.cpp | 3 ++- 3 files changed, 2 insertions(+), 18 deletions(-) (limited to 'libsolidity') diff --git a/libsolidity/inlineasm/AsmCodeGen.cpp b/libsolidity/inlineasm/AsmCodeGen.cpp index 0e4e744f..27750453 100644 --- a/libsolidity/inlineasm/AsmCodeGen.cpp +++ b/libsolidity/inlineasm/AsmCodeGen.cpp @@ -132,17 +132,6 @@ private: eth::Assembly& m_assembly; }; -eth::Assembly assembly::CodeGenerator::assemble( - Block const& _parsedData, - AsmAnalysisInfo& _analysisInfo, - julia::ExternalIdentifierAccess const& _identifierAccess -) -{ - eth::Assembly assembly; - EthAssemblyAdapter assemblyAdapter(assembly); - julia::CodeTransform(assemblyAdapter, _analysisInfo, false, _identifierAccess).run(_parsedData); - return assembly; -} void assembly::CodeGenerator::assemble( Block const& _parsedData, diff --git a/libsolidity/inlineasm/AsmCodeGen.h b/libsolidity/inlineasm/AsmCodeGen.h index 7a149d74..2a36a590 100644 --- a/libsolidity/inlineasm/AsmCodeGen.h +++ b/libsolidity/inlineasm/AsmCodeGen.h @@ -41,12 +41,6 @@ struct Block; class CodeGenerator { public: - /// Performs code generation and @returns the result. - static eth::Assembly assemble( - Block const& _parsedData, - AsmAnalysisInfo& _analysisInfo, - julia::ExternalIdentifierAccess const& _identifierAccess = julia::ExternalIdentifierAccess() - ); /// Performs code generation and appends generated to to _assembly. static void assemble( Block const& _parsedData, diff --git a/libsolidity/interface/AssemblyStack.cpp b/libsolidity/interface/AssemblyStack.cpp index 31d9e494..b6151f56 100644 --- a/libsolidity/interface/AssemblyStack.cpp +++ b/libsolidity/interface/AssemblyStack.cpp @@ -86,7 +86,8 @@ eth::LinkerObject AssemblyStack::assemble(Machine _machine) const { case Machine::EVM: { - auto assembly = assembly::CodeGenerator::assemble(*m_parserResult, *m_analysisInfo); + eth::Assembly assembly; + assembly::CodeGenerator::assemble(*m_parserResult, *m_analysisInfo, assembly); return assembly.assemble(); } case Machine::EVM15: -- cgit v1.2.3 From 8768080a02d6862849705ee106c81672368721e6 Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Fri, 9 Jun 2017 12:47:05 +0100 Subject: Remove excess includes --- libsolidity/interface/AssemblyStack.cpp | 1 + libsolidity/interface/AssemblyStack.h | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) (limited to 'libsolidity') diff --git a/libsolidity/interface/AssemblyStack.cpp b/libsolidity/interface/AssemblyStack.cpp index b6151f56..75877881 100644 --- a/libsolidity/interface/AssemblyStack.cpp +++ b/libsolidity/interface/AssemblyStack.cpp @@ -26,6 +26,7 @@ #include #include #include +#include #include #include diff --git a/libsolidity/interface/AssemblyStack.h b/libsolidity/interface/AssemblyStack.h index 17d5f055..ee2a334c 100644 --- a/libsolidity/interface/AssemblyStack.h +++ b/libsolidity/interface/AssemblyStack.h @@ -21,7 +21,6 @@ #pragma once -#include #include #include -- cgit v1.2.3