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

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

Issue 16154021: Implement reflecting on uninstantiated classes. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Update comment in second test. Created 7 years, 6 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: dart/sdk/lib/_internal/compiler/implementation/enqueue.dart
diff --git a/dart/sdk/lib/_internal/compiler/implementation/enqueue.dart b/dart/sdk/lib/_internal/compiler/implementation/enqueue.dart
index f60fd00fa70382d8b8a766c786c9d2690bbecfc2..c08397142b6295661045ba23085827a7bcab56bb 100644
--- a/dart/sdk/lib/_internal/compiler/implementation/enqueue.dart
+++ b/dart/sdk/lib/_internal/compiler/implementation/enqueue.dart
@@ -170,6 +170,15 @@ abstract class Enqueuer {
registerInstantiatedType(cls.rawType, elements);
}
+ void registerTypeLiteral(Element element, TreeElements elements) {
+ registerInstantiatedClass(compiler.typeClass, elements);
+ compiler.backend.registerTypeLiteral(elements);
+ if (compiler.mirrorsEnabled) {
+ // In order to use reflectClass, we need to find the constructor.
+ registerInstantiatedClass(element, elements);
+ }
+ }
+
bool checkNoEnqueuedInvokedInstanceMethods() {
task.measure(() {
// Run through the classes and see if we need to compile methods.
@@ -349,7 +358,7 @@ abstract class Enqueuer {
// If dart:mirrors is loaded, a const symbol may be used to call a
// static/top-level method or accessor, instantiate a class, call
// an instance method or accessor with the given name.
- if (compiler.mirrorSystemClass == null) return;
+ if (!compiler.mirrorsEnabled) return;
task.ensureAllElementsByName();

Powered by Google App Engine
This is Rietveld 408576698