2021-03-12 08:24:20 +01:00
|
|
|
// 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.
|
|
|
|
|
2022-04-12 11:10:15 +02:00
|
|
|
// Flags: --allow-natives-syntax
|
2021-03-12 08:24:20 +01:00
|
|
|
|
|
|
|
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();
|