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

Unified Diff: tools/dom/templates/html/impl/impl_Element.darttemplate

Issue 1914583002: Use _downcast and _cast instead of "as" to reduce dart2js output size. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 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
« no previous file with comments | « tools/dom/src/WrappedList.dart ('k') | tools/dom/templates/html/impl/impl_IDBFactory.darttemplate » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/dom/templates/html/impl/impl_Element.darttemplate
diff --git a/tools/dom/templates/html/impl/impl_Element.darttemplate b/tools/dom/templates/html/impl/impl_Element.darttemplate
index 806dae6be1a52ba5a7c62cbc44462acbcb48bc65..c9ef54a745369da43327226491544df776d37b69 100644
--- a/tools/dom/templates/html/impl/impl_Element.darttemplate
+++ b/tools/dom/templates/html/impl/impl_Element.darttemplate
@@ -280,7 +280,7 @@ $endif
int get length => _nodeList.length;
- E operator [](int index) => _nodeList[index] as E;
+ E operator [](int index) => _downcast/*<Node, E>*/(_nodeList[index]);
void operator []=(int index, E value) {
throw new UnsupportedError('Cannot modify list');
@@ -298,11 +298,11 @@ $endif
throw new UnsupportedError('Cannot shuffle list');
}
- E get first => _nodeList.first as E;
+ E get first => _downcast/*<Node, E>*/(_nodeList.first);
- E get last => _nodeList.last as E;
+ E get last => _downcast/*<Node, E>*/(_nodeList.last);
- E get single => _nodeList.single as E;
+ E get single => _downcast/*<Node, E>*/(_nodeList.single);
CssClassSet get classes => new _MultiElementCssClassSet(this);
« no previous file with comments | « tools/dom/src/WrappedList.dart ('k') | tools/dom/templates/html/impl/impl_IDBFactory.darttemplate » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698