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

Unified Diff: runtime/lib/typeddata.dart

Issue 13863012: Refactor List.setRange function. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Handle optional arguments in secure_socket.dart Created 7 years, 8 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
Index: runtime/lib/typeddata.dart
diff --git a/runtime/lib/typeddata.dart b/runtime/lib/typeddata.dart
index 75f81a7d67d9bf8f475b927cd63db94cf6015536..282577362ca71a4976d6cc57cdd89155d7f0fef7 100644
--- a/runtime/lib/typeddata.dart
+++ b/runtime/lib/typeddata.dart
@@ -546,10 +546,10 @@ abstract class _TypedListBase {
return IterableMixinWorkaround.getRangeList(this, start, end);
}
- void setRange(int start, int length, List from, [int startFrom = 0]) {
- if (!_setRange(start, length, from, startFrom)) {
+ void setRange(int start, int end, Iterable iterable, [int skipCount = 0]) {
+ if (!_setRange(start, end - start, iterable, skipCount)) {
IterableMixinWorkaround.setRangeList(this, start,
- length, from, startFrom);
+ end, iterable, skipCount);
}
}
@@ -563,7 +563,7 @@ abstract class _TypedListBase {
// Internal utility methods.
- bool _setRange(int start, int length, List from, startFrom)
+ bool _setRange(int start, int length, Iterable from, int startFrom)
native "TypedData_setRange";
}

Powered by Google App Engine
This is Rietveld 408576698