Files
Kmake/deps/v8/test/mjsunit/maglev/regress-342460071.js
2026-05-26 23:36:42 -07:00

20 lines
441 B
JavaScript

// 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
function foo() {
let x = 1;
let y;
[x] = [, y];
if (!x ^ y) return 1;
return 2;
}
%PrepareFunctionForOptimization(foo);
assertEquals(foo(), 1);
assertEquals(foo(), 1);
%OptimizeFunctionOnNextCall(foo);
assertEquals(foo(), 1);