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: --harmony-destructuring-assignment --harmony-destructuring-bind |
6 | 6 // Flags: --min-preparse-length=0 |
7 "use strict"; | |
8 | 7 |
9 function f() { | 8 function f() { |
10 %DeoptimizeNow(); | 9 var a, b; |
11 let x = 23; | 10 [ a, b ] = [1, 2]; |
| 11 assertEquals(1, a); |
| 12 assertEquals(2, b); |
12 } | 13 } |
13 | 14 |
14 %OptimizeFunctionOnNextCall(f); | |
15 f(); | 15 f(); |
OLD | NEW |