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

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

Issue 11304021: Add NativeEnqueuer to work with the Enqueuer. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 2 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: lib/compiler/implementation/compiler.dart
diff --git a/lib/compiler/implementation/compiler.dart b/lib/compiler/implementation/compiler.dart
index 97fad390ba7e5d24a8db82a708960b1d2493c0e1..d23ada5eeebc2fec40192a193a3c5317d5a1b95b 100644
--- a/lib/compiler/implementation/compiler.dart
+++ b/lib/compiler/implementation/compiler.dart
@@ -74,8 +74,12 @@ abstract class Backend {
abstract void enqueueHelpers(Enqueuer world);
abstract void codegen(WorkItem work);
- abstract void processNativeClasses(Enqueuer world,
- Collection<LibraryElement> libraries);
+
+ // The backend determines the native resolution enqueuer so tools like
+ // dart2dart can ignore the native classes.
+ abstract NativeEnqueuer nativeResolutionEnqueuer(world);
+ abstract NativeEnqueuer nativeCodegenEnqueuer(world);
+
abstract void assembleProgram();
abstract List<CompilerTask> get tasks;
@@ -484,6 +488,11 @@ abstract class Compiler implements DiagnosticListener {
});
}
+ enqueuer.resolution.nativeEnqueuer =
+ backend.nativeResolutionEnqueuer(enqueuer.resolution);
+ enqueuer.codegen.nativeEnqueuer =
+ backend.nativeCodegenEnqueuer(enqueuer.codegen);
+
log('Resolving...');
phase = PHASE_RESOLVING;
backend.enqueueHelpers(enqueuer.resolution);
@@ -512,7 +521,7 @@ abstract class Compiler implements DiagnosticListener {
}
void processQueue(Enqueuer world, Element main) {
- backend.processNativeClasses(world, libraries.values);
+ world.nativeEnqueuer.processNativeClasses(libraries.values);
world.addToWorkList(main);
progress.reset();
world.forEach((WorkItem work) {
« no previous file with comments | « no previous file | lib/compiler/implementation/dart_backend/backend.dart » ('j') | lib/compiler/implementation/native_handler.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698