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

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

Issue 9702034: Removes dartc reliance on its own libraries, now can be targeted at any implementation's libraries (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: junit tests fixed Created 8 years, 9 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/arrays.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // BSD-style license that can be found in the LICENSE file.
4
5 function native_ListImplementation_INDEX(index) {
6 var i = index | 0;
7 if (i !== index) {
8 native__NumberJsUtil__throwIllegalArgumentException(index);
9 } else if (i < 0 || i >= this.length) {
10 native__ListJsUtil__throwIndexOutOfRangeException(index);
11 }
12 return this[i];
13 }
14
15 function native_ListImplementation_ASSIGN_INDEX(index, value) {
16 var i = index | 0;
17 if (i !== index) {
18 native__NumberJsUtil__throwIllegalArgumentException(index);
19 } else if (i < 0 || i >= this.length) {
20 native__ListJsUtil__throwIndexOutOfRangeException(index);
21 }
22 this[i] = value;
23 }
24
25 function native_ListImplementation_get$length() {
26 return this.length;
27 }
28
29 function native_ListImplementation__setLength(length) {
30 this.length = length;
31 }
32
33 function native_ListImplementation__add(element) {
34 this.push(element);
35 }
36
37 function native_ListImplementation__removeRange(start, length) {
38 this.splice(start, length);
39 }
40
41 function native_ListImplementation__insertRange(start, length, initialValue) {
42 var array = [start, 0];
43 for (var i = 0; i < length; i++){
44 array.push(initialValue);
45 }
46 this.splice.apply(this, array);
47 }
48
49 function $inlineArrayIndexCheck(array, index) {
50 var i = index | 0;
51 if (i !== index) {
52 native__NumberJsUtil__throwIllegalArgumentException(index);
53 } else if (i < 0 || i >= array.length) {
54 native__ListJsUtil__throwIndexOutOfRangeException(index);
55 }
56 return i;
57 }
OLDNEW
« no previous file with comments | « compiler/lib/implementation/array.dart ('k') | compiler/lib/implementation/arrays.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698