Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(87)

Side by Side Diff: compiler/lib/implementation/array.js

Issue 9178020: Revert "Remove TypeToken as means for assigning type arguments to arrays." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « compiler/lib/implementation/array.dart ('k') | compiler/lib/implementation/type_token.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
5 function native_ListImplementation__indexOperator(index) { 11 function native_ListImplementation__indexOperator(index) {
6 return this[index]; 12 return this[index];
7 } 13 }
8 14
9 function native_ListImplementation__indexAssignOperator(index, value) { 15 function native_ListImplementation__indexAssignOperator(index, value) {
10 this[index] = value; 16 this[index] = value;
11 } 17 }
12 18
13 function native_ListImplementation_get$length() { 19 function native_ListImplementation_get$length() {
14 return this.length; 20 return this.length;
(...skipping 18 matching lines...) Expand all
33 this.splice(start, length); 39 this.splice(start, length);
34 } 40 }
35 41
36 function native_ListImplementation__insertRange(start, length, initialValue) { 42 function native_ListImplementation__insertRange(start, length, initialValue) {
37 var array = [start, 0]; 43 var array = [start, 0];
38 for (var i = 0; i < length; i++){ 44 for (var i = 0; i < length; i++){
39 array.push(initialValue); 45 array.push(initialValue);
40 } 46 }
41 this.splice.apply(this, array); 47 this.splice.apply(this, array);
42 } 48 }
OLDNEW
« no previous file with comments | « compiler/lib/implementation/array.dart ('k') | compiler/lib/implementation/type_token.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698