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

Unified Diff: runtime/lib/array.dart

Issue 10898003: Remove List.copyFrom from VM and from tests. It was removed from the List interface in r941. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comment, fix error. Created 8 years, 4 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 | « lib/html/src/DocumentFragmentWrappingImplementation.dart ('k') | runtime/lib/growable_array.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/array.dart
diff --git a/runtime/lib/array.dart b/runtime/lib/array.dart
index b8c3e3b19e81aa73bcdaa1031a372d83e6f5b3c4..40766510e77e3ffd4cfd6dbd6a1f4c82cdb0613a 100644
--- a/runtime/lib/array.dart
+++ b/runtime/lib/array.dart
@@ -18,14 +18,6 @@ class ObjectArray<E> implements List<E> {
int get length() native "ObjectArray_getLength";
- void copyFrom(List src, int srcStart, int dstStart, int count) {
- if (src is ObjectArray) {
- _copyFromObjectArray(src, srcStart, dstStart, count);
- } else {
- Arrays.copy(src, srcStart, this, dstStart, count);
- }
- }
-
void _copyFromObjectArray(ObjectArray src,
int srcStart,
int dstStart,
@@ -36,7 +28,11 @@ class ObjectArray<E> implements List<E> {
if (length < 0) {
throw new IllegalArgumentException("negative length $length");
}
- copyFrom(from, startFrom, start, length);
+ if (from is ObjectArray) {
+ _copyFromObjectArray(from, startFrom, start, length);
+ } else {
+ Arrays.copy(from, startFrom, this, start, length);
+ }
}
void removeRange(int start, int length) {
« no previous file with comments | « lib/html/src/DocumentFragmentWrappingImplementation.dart ('k') | runtime/lib/growable_array.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698