| 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-deoptimization | 5 // Flags: --allow-natives-syntax --use-osr |
| 6 | 6 |
| 7 function bar() { | 7 function bar() { |
| 8 var sum = 11; | 8 var sum = 11; |
| 9 var i = 35; | 9 var i = 35; |
| 10 while (i-- > 31) { | 10 while (i-- > 31) { |
| 11 LOOP1(); | 11 LOOP1(); |
| 12 j = 9; | 12 j = 9; |
| 13 while (j-- > 7) { | 13 while (j-- > 7) { |
| 14 LOOP2(); | 14 LOOP2(); |
| 15 sum = sum + j * 5; | 15 sum = sum + j * 5; |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 if (i == j) body = body.replace(r, "%OptimizeOsr();"); | 54 if (i == j) body = body.replace(r, "%OptimizeOsr();"); |
| 55 else body = body.replace(r, ""); | 55 else body = body.replace(r, ""); |
| 56 } | 56 } |
| 57 return eval("(" + body + ")"); | 57 return eval("(" + body + ")"); |
| 58 } | 58 } |
| 59 | 59 |
| 60 for (var i = 1; i < 10; i++) { | 60 for (var i = 1; i < 10; i++) { |
| 61 var f = gen(i); | 61 var f = gen(i); |
| 62 assertEquals(1979, f()); | 62 assertEquals(1979, f()); |
| 63 } | 63 } |
| OLD | NEW |