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

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: 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 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;
ngeoffray 2013/06/12 19:38:42 Why do you want to keep this?
ahe 2013/06/14 12:00:22 I think it is useful for testing. We should add a
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'));

Powered by Google App Engine
This is Rietveld 408576698