OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 function f(a, i) { |
| 6 a[i] = "object"; |
| 7 } |
| 8 |
| 9 f("make it generic", 0); |
| 10 |
| 11 // Nearly kMaxRegularHeapObjectSize's worth of doubles. |
| 12 var kLength = 500000 / 8; |
| 13 var kValue = 0.1; |
| 14 var a = new Array(kLength); |
| 15 for (var i = 0; i < kLength; i++) { |
| 16 a[i] = kValue; |
| 17 } |
| 18 f(a, 0); |
| 19 for (var i = 1; i < kLength; i++) { |
| 20 assertEquals(kValue, a[i]); |
| 21 } |
OLD | NEW |