20 lines
421 B
JavaScript
20 lines
421 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() {
|
||
|
for (let v0 = 0; v0 < 10; v0++) {
|
||
|
function f1(a2) {
|
||
|
return a2.length;
|
||
|
}
|
||
|
f1(f1("0"));
|
||
|
}
|
||
|
}
|
||
|
|
||
|
%PrepareFunctionForOptimization(foo);
|
||
|
foo();
|
||
|
%OptimizeFunctionOnNextCall(foo);
|
||
|
foo();
|