| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 function native_ListFactory__new(typeToken, length) { | |
| 6 return RTT.setTypeInfo( | |
| 7 new Array(length), | |
| 8 Array.$lookupRTT(RTT.getTypeInfo(typeToken).typeArgs)); | |
| 9 } | |
| 10 | |
| 11 function native_ListImplementation__indexOperator(index) { | 5 function native_ListImplementation__indexOperator(index) { |
| 12 return this[index]; | 6 return this[index]; |
| 13 } | 7 } |
| 14 | 8 |
| 15 function native_ListImplementation__indexAssignOperator(index, value) { | 9 function native_ListImplementation__indexAssignOperator(index, value) { |
| 16 this[index] = value; | 10 this[index] = value; |
| 17 } | 11 } |
| 18 | 12 |
| 19 function native_ListImplementation_get$length() { | 13 function native_ListImplementation_get$length() { |
| 20 return this.length; | 14 return this.length; |
| (...skipping 18 matching lines...) Expand all Loading... |
| 39 this.splice(start, length); | 33 this.splice(start, length); |
| 40 } | 34 } |
| 41 | 35 |
| 42 function native_ListImplementation__insertRange(start, length, initialValue) { | 36 function native_ListImplementation__insertRange(start, length, initialValue) { |
| 43 var array = [start, 0]; | 37 var array = [start, 0]; |
| 44 for (var i = 0; i < length; i++){ | 38 for (var i = 0; i < length; i++){ |
| 45 array.push(initialValue); | 39 array.push(initialValue); |
| 46 } | 40 } |
| 47 this.splice.apply(this, array); | 41 this.splice.apply(this, array); |
| 48 } | 42 } |
| OLD | NEW |