Skip to content

Commit

Permalink
EVMCodeTransformTest: use defaulted evm dialect
Browse files Browse the repository at this point in the history
  • Loading branch information
clonker committed Dec 10, 2024
1 parent 977c481 commit 6a26b71
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion test/libyul/EVMCodeTransformTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ TestCase::TestResult EVMCodeTransformTest::run(std::ostream& _stream, std::strin
solidity::frontend::OptimiserSettings settings = solidity::frontend::OptimiserSettings::none();
settings.runYulOptimiser = false;
settings.optimizeStackAllocation = m_stackOpt;
// use current version of dialect (default-constructed) intended, as code generation
// can be different from version to version
YulStack stack(
EVMVersion{},
std::nullopt,
Expand All @@ -70,10 +72,12 @@ TestCase::TestResult EVMCodeTransformTest::run(std::ostream& _stream, std::strin

evmasm::Assembly assembly{CommonOptions::get().evmVersion(), false, std::nullopt, {}};
EthAssemblyAdapter adapter(assembly);
// use current version of dialect (default-constructed) intended, as code generation
// can be different from version to version
EVMObjectCompiler::compile(
*stack.parserResult(),
adapter,
CommonOptions::get().evmDialect(),
EVMDialect::strictAssemblyForEVMObjects(EVMVersion{}, std::nullopt),
m_stackOpt,
std::nullopt
);
Expand Down

0 comments on commit 6a26b71

Please sign in to comment.