Move AsmJsonImporter from libsolidity to libyul

It is next to AsmJsonConverter now and interdependencies are shrunk.
This commit is contained in:
Alex Beregszaszi 2020-10-29 14:06:31 +00:00
parent 80071d59c5
commit 1ab6340828
5 changed files with 20 additions and 19 deletions

View File

@ -47,8 +47,6 @@ set(sources
ast/ASTAnnotations.h
ast/ASTEnums.h
ast/ASTForward.h
ast/AsmJsonImporter.cpp
ast/AsmJsonImporter.h
ast/ASTJsonConverter.cpp
ast/ASTJsonConverter.h
ast/ASTUtils.cpp

View File

@ -22,18 +22,20 @@
*/
#include <libsolidity/ast/ASTJsonImporter.h>
#include <libsolidity/ast/AsmJsonImporter.h>
#include <liblangutil/Scanner.h>
#include <libyul/AsmJsonImporter.h>
#include <libyul/AsmParser.h>
#include <libyul/Dialect.h>
#include <libyul/backends/evm/EVMDialect.h>
#include <liblangutil/ErrorReporter.h>
#include <liblangutil/Exceptions.h>
#include <liblangutil/Scanner.h>
#include <liblangutil/SourceLocation.h>
#include <liblangutil/Token.h>
#include <boost/algorithm/string/split.hpp>
#include <boost/algorithm/string.hpp>
#include <liblangutil/Token.h>
#include <libyul/AsmParser.h>
#include <libyul/backends/evm/EVMDialect.h>
#include <liblangutil/SourceLocation.h>
#include <liblangutil/Exceptions.h>
#include <liblangutil/ErrorReporter.h>
using namespace std;
@ -569,7 +571,7 @@ ASTPointer<InlineAssembly> ASTJsonImporter::createInlineAssembly(Json::Value con
astAssert(m_evmVersion == evmVersion, "Imported tree evm version differs from configured evm version!");
yul::Dialect const& dialect = yul::EVMDialect::strictAssemblyForEVM(evmVersion.value());
shared_ptr<yul::Block> operations = make_shared<yul::Block>(AsmJsonImporter(m_currentSourceName).createBlock(member(_node, "AST")));
shared_ptr<yul::Block> operations = make_shared<yul::Block>(yul::AsmJsonImporter(m_currentSourceName).createBlock(member(_node, "AST")));
return createASTNode<InlineAssembly>(
_node,
nullOrASTString(_node, "documentation"),

View File

@ -22,23 +22,22 @@
*/
#include <libsolidity/ast/AsmJsonImporter.h>
#include <libsolidity/ast/ASTJsonImporter.h>
#include <libsolidity/ast/Types.h>
#include <libyul/AsmJsonImporter.h>
#include <libyul/AsmData.h>
#include <libyul/AsmDataForward.h>
#include <liblangutil/Exceptions.h>
#include <liblangutil/Scanner.h>
#include <vector>
#include <boost/algorithm/string/split.hpp>
#include <boost/algorithm/string.hpp>
#include <vector>
using namespace std;
using namespace solidity::yul;
using namespace solidity::langutil;
namespace solidity::frontend
namespace solidity::yul
{
using SourceLocation = langutil::SourceLocation;

View File

@ -29,7 +29,7 @@
#include <utility>
namespace solidity::frontend
namespace solidity::yul
{
/**

View File

@ -6,6 +6,8 @@ add_library(yul
AsmDataForward.h
AsmJsonConverter.h
AsmJsonConverter.cpp
AsmJsonImporter.h
AsmJsonImporter.cpp
AsmParser.cpp
AsmParser.h
AsmPrinter.cpp