| // 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. |
| // Flags: --use-osr --allow-natives-syntax |
| var x = global_counter++; |
| if (x == 5) %OptimizeOsr(1); |
| if (x == 10) throw "terminate"; |
| %NeverOptimizeFunction(thrower); // Don't want to inline the thrower. |
| %NeverOptimizeFunction(test); // Don't want to inline the func into test. |
| for (var i = 0; i < 3; i++) { |
| while (true) while (true) thrower(); |
| while (true) while (true) while (true) thrower(); |
| while (true) while (true) while (true) while (true) thrower(); |