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

Unified Diff: tools/dom/templates/immutable_list_mixin.darttemplate

Issue 23534050: Make direct calls to _nativeIndexedGetter in "get last" "get first" "get single" instead of calling… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 3 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 | « tools/dom/scripts/templateloader.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/dom/templates/immutable_list_mixin.darttemplate
===================================================================
--- tools/dom/templates/immutable_list_mixin.darttemplate (revision 27268)
+++ tools/dom/templates/immutable_list_mixin.darttemplate (working copy)
@@ -17,8 +17,12 @@
$if DART2JS
return JS('$E', '#[0]', this);
$else
+$if USE_NATIVE_INDEXED_GETTER
+ return $GETTER(0);
+$else
return this[0];
$endif
+$endif
}
throw new StateError("No elements");
}
@@ -29,8 +33,12 @@
$if DART2JS
return JS('$E', '#[#]', this, len - 1);
$else
+$if USE_NATIVE_INDEXED_GETTER
+ return $GETTER(len - 1);
+$else
return this[len - 1];
$endif
+$endif
}
throw new StateError("No elements");
}
@@ -41,8 +49,12 @@
$if DART2JS
return JS('$E', '#[0]', this);
$else
+$if USE_NATIVE_INDEXED_GETTER
+ return $GETTER(0);
+$else
return this[0];
$endif
+$endif
}
if (len == 0) throw new StateError("No elements");
throw new StateError("More than one element");
« no previous file with comments | « tools/dom/scripts/templateloader.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698