diff options
author | chriseth <chris@ethereum.org> | 2018-11-24 00:01:18 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-24 00:01:18 +0800 |
commit | 9a94e503da84cc66f643b3972bf8ad4defa02060 (patch) | |
tree | 8efb3b6d25ba2574689731bcbea2eac901523d24 /test/tools | |
parent | 4fb15c9327c2c4bfae29f0ff23c1ab0b1218f735 (diff) | |
parent | 8dd0338d127b50e60d50f978be68605e8f8faee5 (diff) | |
download | dexon-solidity-9a94e503da84cc66f643b3972bf8ad4defa02060.tar.gz dexon-solidity-9a94e503da84cc66f643b3972bf8ad4defa02060.tar.zst dexon-solidity-9a94e503da84cc66f643b3972bf8ad4defa02060.zip |
Merge pull request #5491 from ethereum/libyul-as-library
Libyul as static library (version 3 ;( )
Diffstat (limited to 'test/tools')
-rw-r--r-- | test/tools/yulopti.cpp | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/test/tools/yulopti.cpp b/test/tools/yulopti.cpp index 8bc807d4..7a147137 100644 --- a/test/tools/yulopti.cpp +++ b/test/tools/yulopti.cpp @@ -21,12 +21,12 @@ #include <libdevcore/CommonIO.h> #include <liblangutil/ErrorReporter.h> #include <liblangutil/Scanner.h> -#include <libsolidity/inlineasm/AsmAnalysis.h> -#include <libsolidity/inlineasm/AsmAnalysisInfo.h> +#include <libyul/AsmAnalysis.h> +#include <libyul/AsmAnalysisInfo.h> #include <libsolidity/parsing/Parser.h> -#include <libsolidity/inlineasm/AsmData.h> -#include <libsolidity/inlineasm/AsmParser.h> -#include <libsolidity/inlineasm/AsmPrinter.h> +#include <libyul/AsmData.h> +#include <libyul/AsmParser.h> +#include <libyul/AsmPrinter.h> #include <libsolidity/interface/SourceReferenceFormatter.h> #include <libyul/optimiser/BlockFlattener.h> @@ -60,8 +60,7 @@ using namespace std; using namespace dev; using namespace langutil; using namespace dev::solidity; -using namespace dev::solidity::assembly; -using namespace dev::yul; +using namespace yul; namespace po = boost::program_options; @@ -83,14 +82,14 @@ public: { ErrorReporter errorReporter(m_errors); shared_ptr<Scanner> scanner = make_shared<Scanner>(CharStream(_input), ""); - m_ast = assembly::Parser(errorReporter, assembly::AsmFlavour::Strict).parse(scanner, false); + m_ast = yul::Parser(errorReporter, yul::AsmFlavour::Strict).parse(scanner, false); if (!m_ast || !errorReporter.errors().empty()) { cout << "Error parsing source." << endl; printErrors(*scanner); return false; } - m_analysisInfo = make_shared<assembly::AsmAnalysisInfo>(); + m_analysisInfo = make_shared<yul::AsmAnalysisInfo>(); AsmAnalyzer analyzer( *m_analysisInfo, errorReporter, @@ -118,7 +117,7 @@ public: return; if (!disambiguated) { - *m_ast = boost::get<assembly::Block>(Disambiguator(*m_analysisInfo)(*m_ast)); + *m_ast = boost::get<yul::Block>(Disambiguator(*m_analysisInfo)(*m_ast)); m_analysisInfo.reset(); m_nameDispenser = make_shared<NameDispenser>(*m_ast); disambiguated = true; @@ -187,7 +186,7 @@ public: private: ErrorList m_errors; - shared_ptr<assembly::Block> m_ast; + shared_ptr<yul::Block> m_ast; shared_ptr<AsmAnalysisInfo> m_analysisInfo; shared_ptr<NameDispenser> m_nameDispenser; }; |