| OLD | NEW |
| 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.dev; | 5 part of dart._internal; |
| 6 | 6 |
| 7 class Lists { | 7 class Lists { |
| 8 static void copy(List src, int srcStart, | 8 static void copy(List src, int srcStart, |
| 9 List dst, int dstStart, int count) { | 9 List dst, int dstStart, int count) { |
| 10 if (srcStart < dstStart) { | 10 if (srcStart < dstStart) { |
| 11 for (int i = srcStart + count - 1, j = dstStart + count - 1; | 11 for (int i = srcStart + count - 1, j = dstStart + count - 1; |
| 12 i >= srcStart; i--, j--) { | 12 i >= srcStart; i--, j--) { |
| 13 dst[j] = src[i]; | 13 dst[j] = src[i]; |
| 14 } | 14 } |
| 15 } else { | 15 } else { |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 if (start < 0 ) { | 90 if (start < 0 ) { |
| 91 String message = "$start must be greater than or equal to 0"; | 91 String message = "$start must be greater than or equal to 0"; |
| 92 throw new RangeError(message); | 92 throw new RangeError(message); |
| 93 } | 93 } |
| 94 if (start + length > a.length) { | 94 if (start + length > a.length) { |
| 95 String message = "$start + $length must be in the range [0..${a.length})"; | 95 String message = "$start + $length must be in the range [0..${a.length})"; |
| 96 throw new RangeError(message); | 96 throw new RangeError(message); |
| 97 } | 97 } |
| 98 } | 98 } |
| 99 } | 99 } |
| OLD | NEW |