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

Unified Diff: runtime/lib/array_patch.dart

Issue 11369234: Remove private class helping the parser to construct literal lists and maps. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 1 month 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 | runtime/lib/lib_sources.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/array_patch.dart
===================================================================
--- runtime/lib/array_patch.dart (revision 14872)
+++ runtime/lib/array_patch.dart (working copy)
@@ -21,4 +21,15 @@
}
return list;
}
+
+ // Factory constructing a mutable List from a parser generated List literal.
+ // [elements] contains elements that are already type checked.
+ factory List._fromLiteral(List elements) {
+ var list = new List<E>();
+ if (elements.length > 0) {
+ list._setData(elements);
+ list.length = elements.length;
+ }
+ return list;
+ }
}
« no previous file with comments | « no previous file | runtime/lib/lib_sources.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698