1 // Copyright 2015 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 // Flags: --use-osr --allow-natives-syntax --turbo-osr
7 var global_counter = 0;
10 var x = global_counter++;
11 if (x == 5) %OptimizeOsr(thrower.caller);
12 if (x == 10) throw "terminate";
15 %NeverOptimizeFunction(thrower); // Don't want to inline the thrower.
16 %NeverOptimizeFunction(test); // Don't want to inline the func into test.
19 for (var i = 0; i < 3; i++) {
26 while (true) thrower();
30 while (true) while (true) thrower();
34 while (true) while (true) while (true) thrower();
38 while (true) while (true) while (true) while (true) thrower();