OLD | NEW |
1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 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: --min-preparse-length 1 --allow-natives-syntax --lazy-inner-functions | 5 // Flags: --min-preparse-length=1 --allow-natives-syntax --lazy-inner-functions |
6 | 6 |
7 // Test that the information on which variables to allocate in context doesn't | 7 // Test that the information on which variables to allocate in context doesn't |
8 // change when recompiling. | 8 // change when recompiling. |
9 | 9 |
10 (function TestVarInInnerFunction() { | 10 (function TestVarInInnerFunction() { |
11 // Introduce variables which would potentially be context allocated, depending | 11 // Introduce variables which would potentially be context allocated, depending |
12 // on whether an inner function refers to them or not. | 12 // on whether an inner function refers to them or not. |
13 var a = 1; | 13 var a = 1; |
14 var b = 2; | 14 var b = 2; |
15 var c = 3; | 15 var c = 3; |
(...skipping 896 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
912 if (i == 1) { | 912 if (i == 1) { |
913 %OptimizeOsr(); | 913 %OptimizeOsr(); |
914 } | 914 } |
915 var a = 0; | 915 var a = 0; |
916 function inner() { | 916 function inner() { |
917 return a; | 917 return a; |
918 const {b: {a}, c} = {b: {a: 1}, c: 2}; | 918 const {b: {a}, c} = {b: {a: 1}, c: 2}; |
919 } | 919 } |
920 } | 920 } |
921 })(); | 921 })(); |
OLD | NEW |