Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | |
|
ahaas
2016/07/06 07:50:12
2016
| |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 // Flags: --allow-natives-syntax --turbo-filter=test2 | |
| 6 | |
| 7 function test(n) { | |
| 8 return Array(n); | |
| 9 } | |
| 10 | |
| 11 function test2() { | |
| 12 return test(2); | |
| 13 } | |
| 14 | |
| 15 function test3(a) { | |
| 16 a[0] = 1; | |
| 17 } | |
| 18 | |
| 19 test(0); | |
| 20 | |
| 21 var smi_array = [1,2]; | |
| 22 smi_array[2] = 3; | |
| 23 test3(smi_array); | |
| 24 | |
| 25 %OptimizeFunctionOnNextCall(test2); | |
| 26 | |
| 27 var broken_array = test2(); | |
| 28 test3(broken_array); | |
| 29 1+broken_array[0]; | |
| OLD | NEW |