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]; |
+ } |
+ } |
+ } |
+} |