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

Unified Diff: dart/sdk/lib/_internal/compiler/implementation/compiler.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/compiler.dart
diff --git a/dart/sdk/lib/_internal/compiler/implementation/compiler.dart b/dart/sdk/lib/_internal/compiler/implementation/compiler.dart
index b4fa241b69b6eac6a7554b87bd5270a5adc962ad..f71d6e61513d2cbaa4c02e0e0aad32836bdd939e 100644
--- a/dart/sdk/lib/_internal/compiler/implementation/compiler.dart
+++ b/dart/sdk/lib/_internal/compiler/implementation/compiler.dart
@@ -523,6 +523,8 @@ abstract class Compiler implements DiagnosticListener {
bool get hasBuildId => buildId != UNDETERMINED_BUILD_ID;
+ bool get mirrorsEnabled => mirrorSystemClass != null;
+
int getNextFreeClassId() => nextFreeClassId++;
void ensure(bool condition) {
@@ -884,7 +886,7 @@ abstract class Compiler implements DiagnosticListener {
void resolveReflectiveDataIfNeeded() {
// Only need reflective data when dart:mirrors is loaded.
- if (mirrorSystemClass == null) return;
+ if (!mirrorsEnabled) return;
for (LibraryElement library in libraries.values) {
for (Link link = library.metadata; !link.isEmpty; link = link.tail) {

Powered by Google App Engine
This is Rietveld 408576698