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

Unified Diff: dart/sdk/lib/_internal/compiler/implementation/compile_time_constants.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/compile_time_constants.dart
diff --git a/dart/sdk/lib/_internal/compiler/implementation/compile_time_constants.dart b/dart/sdk/lib/_internal/compiler/implementation/compile_time_constants.dart
index 7a31f2e3a897f161a7cc5652463b2a2785733884..ecc8645823df3bf0d40b733657bf6dc2bac1a783 100644
--- a/dart/sdk/lib/_internal/compiler/implementation/compile_time_constants.dart
+++ b/dart/sdk/lib/_internal/compiler/implementation/compile_time_constants.dart
@@ -444,6 +444,9 @@ class CompileTimeConstantEvaluator extends Visitor {
Constant makeTypeConstant(Element element) {
DartType elementType = element.computeType(compiler).asRaw();
+ if (compiler.mirrorsEnabled) {
+ handler.registerInstantiatedClass(element, elements);
+ }
DartType constantType =
compiler.backend.typeImplementation.computeType(compiler);
Constant constant = new TypeConstant(elementType, constantType);

Powered by Google App Engine
This is Rietveld 408576698