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

Unified Diff: runtime/lib/internal_patch.dart

Issue 2685783009: (Re)move methods from internal.Lists that are not used, or only used once. (Closed)
Patch Set: Merge to head. Created 3 years, 10 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 | « runtime/lib/array.dart ('k') | runtime/lib/typed_data_patch.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/internal_patch.dart
diff --git a/runtime/lib/internal_patch.dart b/runtime/lib/internal_patch.dart
index 681b8db9b2d29eadc8021b8f6a472d493659c6ad..9e5300a1f8e3d626e63124b5b97f053a44036a3b 100644
--- a/runtime/lib/internal_patch.dart
+++ b/runtime/lib/internal_patch.dart
@@ -46,3 +46,20 @@ bool _classRangeCheckNegative(int cid, int lowerLimit, int upperLimit) {
// Equivalent of calling FATAL from C++ code.
fatal(msg) native "DartInternal_fatal";
+
+// Utility class now only used by the VM.
+class Lists {
+ static void copy(List src, int srcStart,
+ List dst, int dstStart, int count) {
+ if (srcStart < dstStart) {
+ for (int i = srcStart + count - 1, j = dstStart + count - 1;
+ i >= srcStart; i--, j--) {
+ dst[j] = src[i];
+ }
+ } else {
+ for (int i = srcStart, j = dstStart; i < srcStart + count; i++, j++) {
+ dst[j] = src[i];
+ }
+ }
+ }
+}
« no previous file with comments | « runtime/lib/array.dart ('k') | runtime/lib/typed_data_patch.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698