2017-09-08 11:46:07 +00:00
|
|
|
// Copyright 2017 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() {
|
|
|
|
yield;
|
|
|
|
new Set();
|
|
|
|
for (let x of []) {
|
|
|
|
for (let y of []) {
|
|
|
|
yield;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-03-01 10:19:54 +00:00
|
|
|
%PrepareFunctionForOptimization(foo);
|
2017-09-08 11:46:07 +00:00
|
|
|
let gaga = foo();
|
|
|
|
gaga.next();
|
|
|
|
%OptimizeFunctionOnNextCall(foo);
|
|
|
|
gaga.next();
|