summaryrefslogtreecommitdiff
path: root/deps/v8/test/mjsunit/regress/regress-1168435.js
blob: 9667f4d7fe2784b464e33239386261734a24b9fa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// 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 --concurrent-inlining

function bar() {
  arr = new Array(4);
  iter = arr[Symbol.iterator];
  return iter;
}

function foo(a) {
  iter = bar();
  return iter.isPrototypeOf(iter);
}

%PrepareFunctionForOptimization(foo);
foo();
foo();
%OptimizeFunctionOnNextCall(foo);
foo();