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 --turbo-filter=f | 5 // Flags: --allow-natives-syntax --turbo-filter=f |
6 // Flags: --noanalyze-environment-liveness | |
7 | 6 |
8 function f() { | 7 function f() { |
9 var x = 0; | 8 "use strict"; |
10 for (var y = 0; y < 0; ++y) { | 9 try { |
11 x = (x + y) | 0; | 10 for (let i = 0; i < 10; i++) {} |
12 } | 11 } catch(e) {} |
13 return unbound; | |
14 } | 12 } |
15 %OptimizeFunctionOnNextCall(f); | 13 %OptimizeFunctionOnNextCall(f); |
16 assertThrows(f, ReferenceError); | 14 f(); |
OLD | NEW |