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

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

Issue 12753003: Recognize const/fixed/growable arrays in simple types inferrer. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 9 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
Index: sdk/lib/_internal/compiler/implementation/compiler.dart
===================================================================
--- sdk/lib/_internal/compiler/implementation/compiler.dart (revision 19761)
+++ sdk/lib/_internal/compiler/implementation/compiler.dart (working copy)
@@ -160,6 +160,9 @@
ClassElement get numImplementation => compiler.numClass;
ClassElement get stringImplementation => compiler.stringClass;
ClassElement get listImplementation => compiler.listClass;
+ ClassElement get growableListImplementation => compiler.listClass;
+ ClassElement get fixedListImplementation => compiler.listClass;
+ ClassElement get constListImplementation => compiler.listClass;
ClassElement get mapImplementation => compiler.mapClass;
ClassElement get constMapImplementation => compiler.mapClass;
ClassElement get functionImplementation => compiler.functionClass;
@@ -599,6 +602,15 @@
backend.initializeHelperClasses();
}
+ Element _unnamedListConstructor;
+ Element get unnamedListConstructor {
+ if (_unnamedListConstructor != null) return _unnamedListConstructor;
+ Selector callConstructor = new Selector.callConstructor(
kasperl 2013/03/11 08:40:57 Remove a space before new.
ngeoffray 2013/03/11 08:59:57 Done.
+ const SourceString(""), listClass.getLibrary());
+ return _unnamedListConstructor =
+ listClass.lookupConstructor(callConstructor);
+ }
+
void scanBuiltinLibraries() {
jsHelperLibrary = scanBuiltinLibrary('_js_helper');
interceptorsLibrary = scanBuiltinLibrary('_interceptors');

Powered by Google App Engine
This is Rietveld 408576698