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

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

Issue 12525007: Record dependency information to implement first version of dependency (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 9 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 bdda72eb0990676d3ced0d3081898a7ac6547643..0b5faf7007d139cb1c1cc7934cf34ffa9e78f156 100644
--- a/dart/sdk/lib/_internal/compiler/implementation/compiler.dart
+++ b/dart/sdk/lib/_internal/compiler/implementation/compiler.dart
@@ -135,22 +135,26 @@ abstract class Backend {
// The following methods are hooks for the backend to register its
// helper methods.
- void registerInstantiatedClass(ClassElement cls, Enqueuer enqueuer) {}
- void registerStringInterpolation() {}
- void registerCatchStatement() {}
- void registerThrow() {}
- void registerLazyField() {}
- void registerTypeLiteral() {}
- void registerStackTraceInCatch() {}
- void registerIsCheck(DartType type, Enqueuer enqueuer) {}
- void registerAsCheck(DartType type) {}
- void registerThrowNoSuchMethod() {}
- void registerThrowRuntimeError() {}
- void registerAbstractClassInstantiation() {}
- void registerFallThroughError() {}
- void registerSuperNoSuchMethod() {}
- void registerConstantMap() {}
- void registerRuntimeType() {}
+ void registerInstantiatedClass(ClassElement cls,
+ Enqueuer enqueuer,
+ TreeElements elements) {}
+ void registerStringInterpolation(TreeElements elements) {}
+ void registerCatchStatement(TreeElements elements) {}
+ void registerThrow(TreeElements elements) {}
+ void registerLazyField(TreeElements elements) {}
+ void registerTypeLiteral(TreeElements elements) {}
+ void registerStackTraceInCatch(TreeElements elements) {}
+ void registerIsCheck(DartType type,
+ Enqueuer enqueuer,
+ TreeElements elements) {}
+ void registerAsCheck(DartType type, TreeElements elements) {}
+ void registerThrowNoSuchMethod(TreeElements elements) {}
+ void registerThrowRuntimeError(TreeElements elements) {}
+ void registerAbstractClassInstantiation(TreeElements elements) {}
+ void registerFallThroughError(TreeElements elements) {}
+ void registerSuperNoSuchMethod(TreeElements elements) {}
+ void registerConstantMap(TreeElements elements) {}
+ void registerRuntimeType(TreeElements elements) {}
}
/**
@@ -205,6 +209,15 @@ abstract class Compiler implements DiagnosticListener {
*/
final TokenMap commentMap = new TokenMap();
+ /**
+ * Records global dependencies, that is, dependencies that don't
+ * correspond to a particular element.
+ *
+ * We should get rid of this and ensure that all dependencies are
+ * associated with a particular element.
+ */
+ final TreeElements globalDependencies = new TreeElementMapping(null);
+
final bool enableMinification;
final bool enableTypeAssertions;
final bool enableUserAssertions;
@@ -664,8 +677,6 @@ abstract class Compiler implements DiagnosticListener {
}
}
- deferredLoadTask.registerMainApp(mainApp);
-
log('Resolving...');
phase = PHASE_RESOLVING;
if (analyzeAll) {
@@ -683,6 +694,8 @@ abstract class Compiler implements DiagnosticListener {
// should know this.
world.populate();
+ deferredLoadTask.onResolutionComplete(main);
+
log('Inferring types...');
typesTask.onResolutionComplete(main);

Powered by Google App Engine
This is Rietveld 408576698