OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Flags: --allow-natives-syntax --use-osr --turbo-osr | 5 // Flags: --allow-natives-syntax --use-osr |
6 | 6 |
7 function foo() { | 7 function foo() { |
8 var sum = 0; | 8 var sum = 0; |
9 A: for (var i = 0; i < 5; i++) { | 9 A: for (var i = 0; i < 5; i++) { |
10 B: for (var j = 0; j < 5; j++) { | 10 B: for (var j = 0; j < 5; j++) { |
11 C: for (var k = 0; k < 10; k++) { | 11 C: for (var k = 0; k < 10; k++) { |
12 if (k === 5) %OptimizeOsr(); | 12 if (k === 5) %OptimizeOsr(); |
13 if (k === 6) break B; | 13 if (k === 6) break B; |
14 sum++; | 14 sum++; |
15 } | 15 } |
(...skipping 22 matching lines...) Expand all Loading... |
38 } | 38 } |
39 | 39 |
40 assertEquals(1, bar(1)); | 40 assertEquals(1, bar(1)); |
41 assertEquals(1, bar(1)); | 41 assertEquals(1, bar(1)); |
42 | 42 |
43 assertEquals(5, bar(2)); | 43 assertEquals(5, bar(2)); |
44 assertEquals(5, bar(2)); | 44 assertEquals(5, bar(2)); |
45 | 45 |
46 assertEquals(25, bar(3)); | 46 assertEquals(25, bar(3)); |
47 assertEquals(25, bar(3)); | 47 assertEquals(25, bar(3)); |
OLD | NEW |