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

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

Issue 9255025: Revert the revert of http://code.google.com/p/dart/source/detail?r=3360. (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
11 function native_ListImplementation_INDEX(index) { 5 function native_ListImplementation_INDEX(index) {
12 var i = index | 0; 6 var i = index | 0;
13 if (i !== index) { 7 if (i !== index) {
14 native__NumberJsUtil__throwIllegalArgumentException(index); 8 native__NumberJsUtil__throwIllegalArgumentException(index);
15 } else if (i < 0 || i >= this.length) { 9 } else if (i < 0 || i >= this.length) {
16 native__ListJsUtil__throwIndexOutOfRangeException(index); 10 native__ListJsUtil__throwIndexOutOfRangeException(index);
17 } 11 }
18 return this[i]; 12 return this[i];
19 } 13 }
20 14
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 48
55 function $inlineArrayIndexCheck(array, index) { 49 function $inlineArrayIndexCheck(array, index) {
56 var i = index | 0; 50 var i = index | 0;
57 if (i !== index) { 51 if (i !== index) {
58 native__NumberJsUtil__throwIllegalArgumentException(index); 52 native__NumberJsUtil__throwIllegalArgumentException(index);
59 } else if (i < 0 || i >= array.length) { 53 } else if (i < 0 || i >= array.length) {
60 native__ListJsUtil__throwIndexOutOfRangeException(index); 54 native__ListJsUtil__throwIndexOutOfRangeException(index);
61 } 55 }
62 return i; 56 return i;
63 } 57 }
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