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

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: Don't be clever (doubles can be equal to ints) and change all occurrences. 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 88bff92c4803143f6e19e35290a1ab2ac5c05604..57bea3f85d1a714d3bf86087c6b620654c987d63 100644
--- a/runtime/lib/internal_patch.dart
+++ b/runtime/lib/internal_patch.dart
@@ -43,3 +43,20 @@ bool _classRangeCheck(int cid, int lowerLimit, int upperLimit) {
bool _classRangeCheckNegative(int cid, int lowerLimit, int upperLimit) {
return cid < lowerLimit || cid > upperLimit;
}
+
+// Utility class now only used by the VM.
+class Lists {
+ static void copy(List src, int srcStart,
floitsch 2017/02/15 17:11:38 Nit: use full names. That said: I don't think this
Lasse Reichstein Nielsen 2017/02/17 11:25:20 Correct. I dare not touch it, since it seems to be
+ 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