2015-06-19 13:23:56 +02:00
|
|
|
// Copyright 2015 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-09-21 13:28:42 +02:00
|
|
|
// Flags: --allow-natives-syntax --use-osr --noalways-turbofan
|
2015-06-19 13:23:56 +02:00
|
|
|
|
|
|
|
function foo() {
|
|
|
|
var c = 0;
|
|
|
|
for (var e = 0; e < 1; ++e) {
|
|
|
|
for (var a = 1; a > 0; a--) {
|
|
|
|
c += 1;
|
|
|
|
}
|
|
|
|
for (var b = 1; b > 0; b--) {
|
|
|
|
%OptimizeOsr();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return c;
|
|
|
|
}
|
2019-08-01 08:38:30 +02:00
|
|
|
%PrepareFunctionForOptimization(foo);
|
|
|
|
|
2015-06-19 13:23:56 +02:00
|
|
|
try {
|
|
|
|
foo();
|
|
|
|
} catch (e) {
|
|
|
|
}
|