1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-22 19:45:08 +00:00

LibJS: Disable bytecode optimizations by default

The optimization passes are not stable, which makes test262 flaky.
Address this by introducing a new OptimizationLevel::None and making it
the default.

This removes all the flakiness from test262 in my testing.

We can enable optimizations by default again once they have been made
stable. :^)
This commit is contained in:
Andreas Kling 2022-10-19 14:35:26 +02:00
parent 8fc4c5d27b
commit d9b543da68
2 changed files with 6 additions and 2 deletions

View file

@ -217,7 +217,9 @@ Bytecode::PassManager& Interpreter::optimization_pipeline(Interpreter::Optimizat
return *entry;
auto pm = make<PassManager>();
if (level == OptimizationLevel::Default) {
if (level == OptimizationLevel::None) {
// No optimization.
} else if (level == OptimizationLevel::Optimize) {
pm->add<Passes::GenerateCFG>();
pm->add<Passes::UnifySameBlocks>();
pm->add<Passes::GenerateCFG>();