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

Unified Diff: dart/pkg/dart2js_incremental/lib/dart2js_incremental.dart

Issue 804903004: Refactor LibraryUpdater to prepare for parts. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years 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/pkg/dart2js_incremental/lib/dart2js_incremental.dart
diff --git a/dart/pkg/dart2js_incremental/lib/dart2js_incremental.dart b/dart/pkg/dart2js_incremental/lib/dart2js_incremental.dart
index d5074f8bbddefd86c50f3535e5cd0c7d5b68cf34..5ece461735569f7a718fde9bcb017bfbf64ab5d0 100644
--- a/dart/pkg/dart2js_incremental/lib/dart2js_incremental.dart
+++ b/dart/pkg/dart2js_incremental/lib/dart2js_incremental.dart
@@ -29,6 +29,7 @@ import 'package:compiler/src/elements/elements.dart' show
LibraryElement;
import 'library_updater.dart' show
+ IncrementalCompilerContext,
LibraryUpdater,
Logger;
@@ -51,6 +52,7 @@ class IncrementalCompiler {
final CompilerOutputProvider outputProvider;
final Map<String, dynamic> environment;
final List<String> _updates = <String>[];
+ final IncrementalCompilerContext _context = new IncrementalCompilerContext();
Compiler _compiler;
@@ -73,6 +75,7 @@ class IncrementalCompiler {
if (diagnosticHandler == null) {
throw new ArgumentError('diagnosticHandler is null.');
}
+ _context.incrementalCompiler = this;
}
LibraryElement get mainApp => _compiler.mainApp;
@@ -120,9 +123,10 @@ class IncrementalCompiler {
LibraryUpdater updater = new LibraryUpdater(
_compiler,
mappingInputProvider,
- _compiler.mainApp.canonicalUri,
logTime,
- logVerbose);
+ logVerbose,
+ _context);
+ _context.registerUriWithUpdates(updatedFiles.keys);
Future<Compiler> future = _reuseCompiler(updater.reuseLibrary);
return future.then((Compiler compiler) {
_compiler = compiler;

Powered by Google App Engine
This is Rietveld 408576698