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

Side by Side Diff: sdk/lib/collection/arrays.dart

Issue 11419032: Switch libraries to using new tags. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated to tip of tree. Changed library names to dart.x Created 8 years 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
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 part of dart.collection;
6
5 // TODO(ngeoffray): Rename to Lists. 7 // TODO(ngeoffray): Rename to Lists.
6 class Arrays { 8 class Arrays {
7 static void copy(List src, int srcStart, 9 static void copy(List src, int srcStart,
8 List dst, int dstStart, int count) { 10 List dst, int dstStart, int count) {
9 if (srcStart == null) srcStart = 0; 11 if (srcStart == null) srcStart = 0;
10 if (dstStart == null) dstStart = 0; 12 if (dstStart == null) dstStart = 0;
11 13
12 if (srcStart < dstStart) { 14 if (srcStart < dstStart) {
13 for (int i = srcStart + count - 1, j = dstStart + count - 1; 15 for (int i = srcStart + count - 1, j = dstStart + count - 1;
14 i >= srcStart; i--, j--) { 16 i >= srcStart; i--, j--) {
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 if (start < 0 ) { 85 if (start < 0 ) {
84 String message = "$start must be greater than or equal to 0"; 86 String message = "$start must be greater than or equal to 0";
85 throw new RangeError(message); 87 throw new RangeError(message);
86 } 88 }
87 if (start + length > a.length) { 89 if (start + length > a.length) {
88 String message = "$start + $length must be in the range [0..${a.length})"; 90 String message = "$start + $length must be in the range [0..${a.length})";
89 throw new RangeError(message); 91 throw new RangeError(message);
90 } 92 }
91 } 93 }
92 } 94 }
OLDNEW
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/lib/mirrors.dart ('k') | sdk/lib/collection/collection.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698