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

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

Issue 16817002: Be smarter about when disabling tree-shaking. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Address comments 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
« no previous file with comments | « no previous file | dart/sdk/lib/_internal/compiler/implementation/enqueue.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 b51e9f5923e46a809e3716a7e9d61ed9dae3dcc0..c850caa3ae3367d60e30319a08121a9cf29b1a8a 100644
--- a/dart/sdk/lib/_internal/compiler/implementation/compiler.dart
+++ b/dart/sdk/lib/_internal/compiler/implementation/compiler.dart
@@ -182,6 +182,10 @@ abstract class Backend {
ClassElement classElement = element.getEnclosingClass();
return classElement == compiler.objectClass;
}
+
+ void enableMirrors() {}
+
+ void registerStaticUse(Element element, Enqueuer enqueuer) {}
}
/**
@@ -524,7 +528,7 @@ abstract class Compiler implements DiagnosticListener {
bool get analyzeAll => analyzeAllFlag || compileAll;
- bool get compileAll => mirrorsEnabled;
+ bool get compileAll => false;
bool get disableTypeInference => disableTypeInferenceFlag || mirrorsEnabled;
@@ -663,6 +667,7 @@ abstract class Compiler implements DiagnosticListener {
}
if (uri == Uri.parse('dart:mirrors')) {
mirrorSystemClass = library.find(const SourceString('MirrorSystem'));
+ backend.enableMirrors();
metadataHandler = constantHandler;
} else if (uri == Uri.parse('dart:_collection-dev')) {
symbolImplementationClass = library.find(const SourceString('Symbol'));
« no previous file with comments | « no previous file | dart/sdk/lib/_internal/compiler/implementation/enqueue.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698