| 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: --expose-debug-as debug --allow-natives-syntax --use-inlining | |
| 6 | 5 |
| 7 var Debug = debug.Debug; | 6 var Debug = debug.Debug; |
| 8 | 7 |
| 9 function f1() { | 8 function f1() { |
| 10 return 1; | 9 return 1; |
| 11 } | 10 } |
| 12 | 11 |
| 13 function f2() { | 12 function f2() { |
| 14 return 2; | 13 return 2; |
| 15 } | 14 } |
| (...skipping 29 matching lines...) Expand all Loading... |
| 45 // Setting break point deoptimizes f1 and f3 (which inlines f1). | 44 // Setting break point deoptimizes f1 and f3 (which inlines f1). |
| 46 assertUnoptimized(f1); | 45 assertUnoptimized(f1); |
| 47 assertOptimized(f2); | 46 assertOptimized(f2); |
| 48 assertUnoptimized(f3); | 47 assertUnoptimized(f3); |
| 49 | 48 |
| 50 // We can optimize with break points set. | 49 // We can optimize with break points set. |
| 51 optimize(f4); | 50 optimize(f4); |
| 52 assertOptimized(f4); | 51 assertOptimized(f4); |
| 53 | 52 |
| 54 Debug.setListener(null); | 53 Debug.setListener(null); |
| OLD | NEW |