Files
Kmake/deps/v8/test/mjsunit/turboshaft/maglev-frontend/regress-351576252.js

33 lines
564 B
JavaScript
Raw Normal View History

2026-05-26 23:36:42 -07:00
// Copyright 2024 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --allow-natives-syntax --turbolev
function foo(arg) {
let a = 4;
let c = true;
try {
while (true) {
%PrepareFunctionForOptimization(foo);
if (a++ == arg) %OptimizeOsr();
while (c) {
let d = 10;
while (d-- > 8) {
a++ == arg %OptimizeOsr();
}
}
}
} catch (e) {}
}
for (var i = 0; i < 13; i++) {
foo(i);
}