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

Unified Diff: sdk/lib/_internal/compiler/implementation/lib/js_array.dart

Issue 11896013: Add List.reversed to give a reverse fixed-length view of a list. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Moved some functionality to separate CL. Created 7 years, 11 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 | « samples/swarm/swarm_ui_lib/observable/observable.dart ('k') | sdk/lib/collection_dev/list.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/compiler/implementation/lib/js_array.dart
diff --git a/sdk/lib/_internal/compiler/implementation/lib/js_array.dart b/sdk/lib/_internal/compiler/implementation/lib/js_array.dart
index 1c92f2453bdd79b792276e14c90bf70339b63581..7d438f18aee1eb02c888f5aea3293657844f710e 100644
--- a/sdk/lib/_internal/compiler/implementation/lib/js_array.dart
+++ b/sdk/lib/_internal/compiler/implementation/lib/js_array.dart
@@ -221,6 +221,8 @@ class JSArray<E> implements List<E> {
bool every(bool f(E element)) => IterableMixinWorkaround.every(this, f);
+ List<E> get reversed => new ReversedListView<E>(this, 0, null);
+
void sort([int compare(E a, E b)]) {
checkMutable(this, 'sort');
IterableMixinWorkaround.sortList(this, compare);
« no previous file with comments | « samples/swarm/swarm_ui_lib/observable/observable.dart ('k') | sdk/lib/collection_dev/list.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698