aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2018-12-21 00:22:17 +0800
committerchriseth <chris@ethereum.org>2019-01-08 00:23:38 +0800
commit5b73c2ae3bce09442572b5401a7bcccc2ffe7590 (patch)
treed2e5b07ef78f240b3b8d1ae72cfae4054ce6e41e /test
parent9f5d34af7de481c5b8ce89057a6df2a3283d14b0 (diff)
downloaddexon-solidity-5b73c2ae3bce09442572b5401a7bcccc2ffe7590.tar.gz
dexon-solidity-5b73c2ae3bce09442572b5401a7bcccc2ffe7590.tar.zst
dexon-solidity-5b73c2ae3bce09442572b5401a7bcccc2ffe7590.zip
Take special functions that require literals into account.
Diffstat (limited to 'test')
-rw-r--r--test/libyul/Parser.cpp2
-rw-r--r--test/libyul/YulOptimizerTest.cpp10
-rw-r--r--test/tools/yulopti.cpp2
3 files changed, 7 insertions, 7 deletions
diff --git a/test/libyul/Parser.cpp b/test/libyul/Parser.cpp
index df7e32a1..897f18ae 100644
--- a/test/libyul/Parser.cpp
+++ b/test/libyul/Parser.cpp
@@ -331,7 +331,7 @@ BOOST_AUTO_TEST_CASE(builtins_analysis)
{
return _name == "builtin"_yulstring ? &f : nullptr;
}
- BuiltinFunction f{"builtin"_yulstring, vector<Type>(2), vector<Type>(3), false};
+ BuiltinFunction f{"builtin"_yulstring, vector<Type>(2), vector<Type>(3), false, false};
};
shared_ptr<Dialect> dialect = make_shared<SimpleDialect>();
diff --git a/test/libyul/YulOptimizerTest.cpp b/test/libyul/YulOptimizerTest.cpp
index 1b392e0f..0e3203cb 100644
--- a/test/libyul/YulOptimizerTest.cpp
+++ b/test/libyul/YulOptimizerTest.cpp
@@ -122,7 +122,7 @@ bool YulOptimizerTest::run(ostream& _stream, string const& _linePrefix, bool con
else if (m_optimizerStep == "expressionSplitter")
{
NameDispenser nameDispenser{*m_dialect, *m_ast};
- ExpressionSplitter{nameDispenser}(*m_ast);
+ ExpressionSplitter{*m_dialect, nameDispenser}(*m_ast);
}
else if (m_optimizerStep == "expressionJoiner")
{
@@ -133,7 +133,7 @@ bool YulOptimizerTest::run(ostream& _stream, string const& _linePrefix, bool con
{
disambiguate();
NameDispenser nameDispenser{*m_dialect, *m_ast};
- ExpressionSplitter{nameDispenser}(*m_ast);
+ ExpressionSplitter{*m_dialect, nameDispenser}(*m_ast);
ExpressionJoiner::run(*m_ast);
ExpressionJoiner::run(*m_ast);
}
@@ -158,7 +158,7 @@ bool YulOptimizerTest::run(ostream& _stream, string const& _linePrefix, bool con
(FunctionHoister{})(*m_ast);
(FunctionGrouper{})(*m_ast);
NameDispenser nameDispenser{*m_dialect, *m_ast};
- ExpressionSplitter{nameDispenser}(*m_ast);
+ ExpressionSplitter{*m_dialect, nameDispenser}(*m_ast);
FullInliner(*m_ast, nameDispenser).run();
ExpressionJoiner::run(*m_ast);
}
@@ -182,7 +182,7 @@ bool YulOptimizerTest::run(ostream& _stream, string const& _linePrefix, bool con
{
disambiguate();
NameDispenser nameDispenser{*m_dialect, *m_ast};
- ExpressionSplitter{nameDispenser}(*m_ast);
+ ExpressionSplitter{*m_dialect, nameDispenser}(*m_ast);
CommonSubexpressionEliminator{*m_dialect}(*m_ast);
ExpressionSimplifier::run(*m_dialect, *m_ast);
UnusedPruner::runUntilStabilised(*m_dialect, *m_ast);
@@ -260,7 +260,7 @@ void YulOptimizerTest::printIndented(ostream& _stream, string const& _output, st
bool YulOptimizerTest::parse(ostream& _stream, string const& _linePrefix, bool const _formatted)
{
- m_dialect = m_yul ? yul::Dialect::yul() : yul::EVMDialect::strictAssemblyForEVM();
+ m_dialect = m_yul ? yul::Dialect::yul() : yul::EVMDialect::strictAssemblyForEVMObjects();
ErrorList errors;
ErrorReporter errorReporter(errors);
shared_ptr<Scanner> scanner = make_shared<Scanner>(CharStream(m_source, ""));
diff --git a/test/tools/yulopti.cpp b/test/tools/yulopti.cpp
index 8ef56ffe..ac21fd91 100644
--- a/test/tools/yulopti.cpp
+++ b/test/tools/yulopti.cpp
@@ -149,7 +149,7 @@ public:
(VarDeclInitializer{})(*m_ast);
break;
case 'x':
- ExpressionSplitter{*m_nameDispenser}(*m_ast);
+ ExpressionSplitter{*m_dialect, *m_nameDispenser}(*m_ast);
break;
case 'j':
ExpressionJoiner::run(*m_ast);