Skip to content

Commit f3ff294

Browse files
committed
Require EVM dialect in stack layout generation tests.
1 parent d967654 commit f3ff294

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

test/libyul/StackLayoutGeneratorTest.cpp

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -232,13 +232,10 @@ TestCase::TestResult StackLayoutGeneratorTest::run(std::ostream& _stream, std::s
232232
yulStack.parserResult()->code()->root()
233233
);
234234

235-
bool simulateFunctionsWithJumps = true;
236-
size_t reachableStackDepth = 16;
237-
if (auto const* evmDialect = dynamic_cast<EVMDialect const*>(&yulStack.dialect()))
238-
{
239-
simulateFunctionsWithJumps = !evmDialect->eofVersion().has_value();
240-
reachableStackDepth = evmDialect->reachableStackDepth();
241-
}
235+
auto const* evmDialect = dynamic_cast<EVMDialect const*>(&yulStack.dialect());
236+
solAssert(evmDialect, "StackLayoutGenerator can only be run on EVM dialects.");
237+
bool simulateFunctionsWithJumps = !evmDialect->eofVersion().has_value();
238+
size_t reachableStackDepth = evmDialect->reachableStackDepth();
242239

243240
StackLayout stackLayout = StackLayoutGenerator::run(*cfg, simulateFunctionsWithJumps, reachableStackDepth);
244241

0 commit comments

Comments
 (0)