aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2018-12-04 21:11:49 +0800
committerGitHub <noreply@github.com>2018-12-04 21:11:49 +0800
commit8654f8f6d4cb8f609d5b43df217aff1406acbe6a (patch)
treef6c984d082b7da3ce34e464f392d7bab8d445301 /test
parent4e5dabf832ddefc30035e67ad450a12f17c8345a (diff)
parent99db4e3ff45c2a8d5d9c645774f099b82b7618ec (diff)
downloaddexon-solidity-8654f8f6d4cb8f609d5b43df217aff1406acbe6a.tar.gz
dexon-solidity-8654f8f6d4cb8f609d5b43df217aff1406acbe6a.tar.zst
dexon-solidity-8654f8f6d4cb8f609d5b43df217aff1406acbe6a.zip
Merge pull request #5573 from ethereum/builtins
[Yul] Introduce the concept of builtin functions.
Diffstat (limited to 'test')
-rw-r--r--test/libyul/Common.cpp6
-rw-r--r--test/libyul/Parser.cpp4
-rw-r--r--test/libyul/YulOptimizerTest.cpp6
-rw-r--r--test/tools/yulopti.cpp4
4 files changed, 10 insertions, 10 deletions
diff --git a/test/libyul/Common.cpp b/test/libyul/Common.cpp
index a247a169..e2462eb7 100644
--- a/test/libyul/Common.cpp
+++ b/test/libyul/Common.cpp
@@ -54,11 +54,11 @@ void yul::test::printErrors(ErrorList const& _errors, Scanner const& _scanner)
pair<shared_ptr<Block>, shared_ptr<yul::AsmAnalysisInfo>> yul::test::parse(string const& _source, bool _yul)
{
- auto flavour = _yul ? yul::AsmFlavour::Yul : yul::AsmFlavour::Strict;
+ Dialect dialect = _yul ? yul::Dialect::yul() : yul::Dialect::strictAssemblyForEVM();
ErrorList errors;
ErrorReporter errorReporter(errors);
auto scanner = make_shared<Scanner>(CharStream(_source, ""));
- auto parserResult = yul::Parser(errorReporter, flavour).parse(scanner, false);
+ auto parserResult = yul::Parser(errorReporter, dialect).parse(scanner, false);
if (parserResult)
{
BOOST_REQUIRE(errorReporter.errors().empty());
@@ -68,7 +68,7 @@ pair<shared_ptr<Block>, shared_ptr<yul::AsmAnalysisInfo>> yul::test::parse(strin
errorReporter,
dev::test::Options::get().evmVersion(),
boost::none,
- flavour
+ dialect
);
if (analyzer.analyze(*parserResult))
{
diff --git a/test/libyul/Parser.cpp b/test/libyul/Parser.cpp
index 2d9c8904..bbaf01bf 100644
--- a/test/libyul/Parser.cpp
+++ b/test/libyul/Parser.cpp
@@ -52,7 +52,7 @@ bool parse(string const& _source, ErrorReporter& errorReporter)
try
{
auto scanner = make_shared<Scanner>(CharStream(_source, ""));
- auto parserResult = yul::Parser(errorReporter, yul::AsmFlavour::Yul).parse(scanner, false);
+ auto parserResult = yul::Parser(errorReporter, yul::Dialect::yul()).parse(scanner, false);
if (parserResult)
{
yul::AsmAnalysisInfo analysisInfo;
@@ -61,7 +61,7 @@ bool parse(string const& _source, ErrorReporter& errorReporter)
errorReporter,
dev::test::Options::get().evmVersion(),
boost::none,
- yul::AsmFlavour::Yul
+ yul::Dialect::yul()
)).analyze(*parserResult);
}
}
diff --git a/test/libyul/YulOptimizerTest.cpp b/test/libyul/YulOptimizerTest.cpp
index 15d70faa..d1d22fd0 100644
--- a/test/libyul/YulOptimizerTest.cpp
+++ b/test/libyul/YulOptimizerTest.cpp
@@ -256,11 +256,11 @@ void YulOptimizerTest::printIndented(ostream& _stream, string const& _output, st
bool YulOptimizerTest::parse(ostream& _stream, string const& _linePrefix, bool const _formatted)
{
- yul::AsmFlavour flavour = m_yul ? yul::AsmFlavour::Yul : yul::AsmFlavour::Strict;
+ yul::Dialect dialect = m_yul ? yul::Dialect::yul() : yul::Dialect::strictAssemblyForEVM();
ErrorList errors;
ErrorReporter errorReporter(errors);
shared_ptr<Scanner> scanner = make_shared<Scanner>(CharStream(m_source, ""));
- m_ast = yul::Parser(errorReporter, flavour).parse(scanner, false);
+ m_ast = yul::Parser(errorReporter, dialect).parse(scanner, false);
if (!m_ast || !errorReporter.errors().empty())
{
FormattedScope(_stream, _formatted, {formatting::BOLD, formatting::RED}) << _linePrefix << "Error parsing source." << endl;
@@ -273,7 +273,7 @@ bool YulOptimizerTest::parse(ostream& _stream, string const& _linePrefix, bool c
errorReporter,
dev::test::Options::get().evmVersion(),
boost::none,
- flavour
+ dialect
);
if (!analyzer.analyze(*m_ast) || !errorReporter.errors().empty())
{
diff --git a/test/tools/yulopti.cpp b/test/tools/yulopti.cpp
index 5273bbb9..e867f049 100644
--- a/test/tools/yulopti.cpp
+++ b/test/tools/yulopti.cpp
@@ -82,7 +82,7 @@ public:
{
ErrorReporter errorReporter(m_errors);
shared_ptr<Scanner> scanner = make_shared<Scanner>(CharStream(_input, ""));
- m_ast = yul::Parser(errorReporter, yul::AsmFlavour::Strict).parse(scanner, false);
+ m_ast = yul::Parser(errorReporter, yul::Dialect::strictAssemblyForEVM()).parse(scanner, false);
if (!m_ast || !errorReporter.errors().empty())
{
cout << "Error parsing source." << endl;
@@ -95,7 +95,7 @@ public:
errorReporter,
EVMVersion::byzantium(),
boost::none,
- AsmFlavour::Strict
+ Dialect::strictAssemblyForEVM()
);
if (!analyzer.analyze(*m_ast) || !errorReporter.errors().empty())
{