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

Unified Diff: compiler/lib/implementation/array.js

Issue 8321024: Clean up (most) uses of Array. Still more to come in the VM corelib code base. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 9 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « compiler/lib/implementation/array.dart ('k') | compiler/lib/implementation/arrays.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: compiler/lib/implementation/array.js
===================================================================
--- compiler/lib/implementation/array.js (revision 486)
+++ compiler/lib/implementation/array.js (working copy)
@@ -2,35 +2,29 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-function native_ArrayFactory__new(typeToken, length) {
- return RTT.setTypeInfo(
- new Array(length),
- Array.$lookupRTT(RTT.getTypeInfo(typeToken).typeArgs));
-}
-
function native_ListFactory__new(typeToken, length) {
return RTT.setTypeInfo(
new Array(length),
Array.$lookupRTT(RTT.getTypeInfo(typeToken).typeArgs));
}
-function native_ObjectArray__indexOperator(index) {
+function native_ListImplementation__indexOperator(index) {
return this[index];
}
-function native_ObjectArray__indexAssignOperator(index, value) {
+function native_ListImplementation__indexAssignOperator(index, value) {
this[index] = value;
}
-function native_ObjectArray_get$length() {
+function native_ListImplementation_get$length() {
return this.length;
}
-function native_ObjectArray__setLength(length) {
+function native_ListImplementation__setLength(length) {
this.length = length;
}
-function native_ObjectArray__add(element) {
+function native_ListImplementation__add(element) {
this.push(element);
}
@@ -41,11 +35,11 @@
native__ArrayJsUtil__throwIndexOutOfRangeException(index);
}
-function native_ObjectArray__removeRange(start, length) {
+function native_ListImplementation__removeRange(start, length) {
this.splice(start, length);
}
-function native_ObjectArray__insertRange(start, length, initialValue) {
+function native_ListImplementation__insertRange(start, length, initialValue) {
var array = [start, 0];
for (var i = 0; i < length; i++){
array.push(initialValue);
« 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