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

25 lines
519 B
JavaScript

// Copyright 2021 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 --no-lazy-feedback-allocation
var bar = 0;
function foo(outer_arg) {
var arr = [1];
var func = function (arg) {
bar += arg;
if (outer_arg) {}
};
try {
arr.filter(func);
} catch (e) {}
};
%PrepareFunctionForOptimization(foo);
foo();
foo();
%OptimizeFunctionOnNextCall(foo);
bar = {};
foo();