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

Unified Diff: runtime/lib/typed_data.dart

Issue 19965003: Fix sublist check, add missing methods and add tests. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 5 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 | « no previous file | sdk/lib/typed_data/dart2js/typed_data_dart2js.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/typed_data.dart
diff --git a/runtime/lib/typed_data.dart b/runtime/lib/typed_data.dart
index 15a8debb21b315087e2fbac1073d58a5826c3871..fef87bc2e57abe6296ddc295e20174cafb0f5053 100644
--- a/runtime/lib/typed_data.dart
+++ b/runtime/lib/typed_data.dart
@@ -351,6 +351,10 @@ abstract class _TypedListBase {
return IterableMixinWorkaround.singleWhere(this, test);
}
+ Iterable<num> get reversed {
+ return IterableMixinWorkaround.reversedList(this);
+ }
+
num elementAt(int index) {
return this[index];
}
@@ -474,6 +478,10 @@ abstract class _TypedListBase {
return new Set.from(this);
}
+ Map<int, num> asMap() {
+ return IterableMixinWorkaround.asMapList(this);
+ }
+
List sublist(int start, [int end]) {
if (end == null) end = length;
int length = end - start;
« no previous file with comments | « no previous file | sdk/lib/typed_data/dart2js/typed_data_dart2js.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698