From 62e650dc42042ace9d008178d2cad52e09748c56 Mon Sep 17 00:00:00 2001 From: chriseth Date: Mon, 25 Feb 2019 17:23:11 +0100 Subject: [PATCH 1/2] Remove cpp files without symbols. --- libyul/AsmAnalysisInfo.cpp | 26 -------------------------- libyul/CMakeLists.txt | 2 -- libyul/Dialect.cpp | 29 ----------------------------- 3 files changed, 57 deletions(-) delete mode 100644 libyul/AsmAnalysisInfo.cpp delete mode 100644 libyul/Dialect.cpp diff --git a/libyul/AsmAnalysisInfo.cpp b/libyul/AsmAnalysisInfo.cpp deleted file mode 100644 index 450c0f8f6..000000000 --- a/libyul/AsmAnalysisInfo.cpp +++ /dev/null @@ -1,26 +0,0 @@ -/* - This file is part of solidity. - - solidity is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - solidity is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with solidity. If not, see . -*/ -/** - * Information generated during analyzer part of inline assembly. - */ - -#include - -#include - -#include - diff --git a/libyul/CMakeLists.txt b/libyul/CMakeLists.txt index 748343953..920a7f048 100644 --- a/libyul/CMakeLists.txt +++ b/libyul/CMakeLists.txt @@ -1,7 +1,6 @@ add_library(yul AsmAnalysis.cpp AsmAnalysis.h - AsmAnalysisInfo.cpp AsmAnalysisInfo.h AsmData.h AsmDataForward.h @@ -17,7 +16,6 @@ add_library(yul AssemblyStack.cpp CompilabilityChecker.cpp CompilabilityChecker.h - Dialect.cpp Dialect.h Exceptions.h Object.cpp diff --git a/libyul/Dialect.cpp b/libyul/Dialect.cpp deleted file mode 100644 index f6985c17a..000000000 --- a/libyul/Dialect.cpp +++ /dev/null @@ -1,29 +0,0 @@ -/* - This file is part of solidity. - - solidity is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - solidity is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with solidity. If not, see . -*/ -/** - * Yul dialect. - */ - -#include - -#include -#include - -#include - -using namespace yul; -using namespace std; From 35f0654f1cb6cd2d62a801d3779d273e188becaf Mon Sep 17 00:00:00 2001 From: chriseth Date: Mon, 25 Feb 2019 17:27:10 +0100 Subject: [PATCH 2/2] Fix usage of EVMVersion in LLL. --- liblll/Compiler.cpp | 4 ++-- liblll/Compiler.h | 4 ++-- lllc/main.cpp | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/liblll/Compiler.cpp b/liblll/Compiler.cpp index 6296cbcff..065ffb32a 100644 --- a/liblll/Compiler.cpp +++ b/liblll/Compiler.cpp @@ -28,7 +28,7 @@ using namespace std; using namespace dev; using namespace dev::lll; -bytes dev::lll::compileLLL(string const& _src, dev::solidity::EVMVersion _evmVersion, bool _opt, std::vector* _errors, ReadCallback const& _readFile) +bytes dev::lll::compileLLL(string const& _src, langutil::EVMVersion _evmVersion, bool _opt, std::vector* _errors, ReadCallback const& _readFile) { try { @@ -66,7 +66,7 @@ bytes dev::lll::compileLLL(string const& _src, dev::solidity::EVMVersion _evmVer return bytes(); } -std::string dev::lll::compileLLLToAsm(std::string const& _src, EVMVersion _evmVersion, bool _opt, std::vector* _errors, ReadCallback const& _readFile) +std::string dev::lll::compileLLLToAsm(std::string const& _src, langutil::EVMVersion _evmVersion, bool _opt, std::vector* _errors, ReadCallback const& _readFile) { try { diff --git a/liblll/Compiler.h b/liblll/Compiler.h index 93235cdd2..a8a7b9988 100644 --- a/liblll/Compiler.h +++ b/liblll/Compiler.h @@ -36,8 +36,8 @@ namespace lll using ReadCallback = std::function; std::string parseLLL(std::string const& _src); -std::string compileLLLToAsm(std::string const& _src, solidity::EVMVersion _evmVersion, bool _opt = true, std::vector* _errors = nullptr, ReadCallback const& _readFile = ReadCallback()); -bytes compileLLL(std::string const& _src, solidity::EVMVersion _evmVersion, bool _opt = true, std::vector* _errors = nullptr, ReadCallback const& _readFile = ReadCallback()); +std::string compileLLLToAsm(std::string const& _src, langutil::EVMVersion _evmVersion, bool _opt = true, std::vector* _errors = nullptr, ReadCallback const& _readFile = ReadCallback()); +bytes compileLLL(std::string const& _src, langutil::EVMVersion _evmVersion, bool _opt = true, std::vector* _errors = nullptr, ReadCallback const& _readFile = ReadCallback()); } } diff --git a/lllc/main.cpp b/lllc/main.cpp index f863451dd..f7f45e741 100644 --- a/lllc/main.cpp +++ b/lllc/main.cpp @@ -134,7 +134,7 @@ int main(int argc, char** argv) } else if (mode == Binary || mode == Hex) { - auto bs = compileLLL(src, EVMVersion{}, optimise ? true : false, &errors, readFileAsString); + auto bs = compileLLL(src, langutil::EVMVersion{}, optimise ? true : false, &errors, readFileAsString); if (mode == Hex) cout << toHex(bs) << endl; else if (mode == Binary) @@ -146,7 +146,7 @@ int main(int argc, char** argv) } else if (mode == Assembly) { - cout << compileLLLToAsm(src, EVMVersion{}, optimise ? true : false, &errors, readFileAsString) << endl; + cout << compileLLLToAsm(src, langutil::EVMVersion{}, optimise ? true : false, &errors, readFileAsString) << endl; } for (auto const& i: errors)