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

Unified Diff: dart/site/try/poi/poi.dart

Issue 804903004: Refactor LibraryUpdater to prepare for parts. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Merged with r42383. 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
« no previous file with comments | « dart/pkg/dart2js_incremental/lib/library_updater.dart ('k') | dart/tests/try/poi/apply_updates_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/site/try/poi/poi.dart
diff --git a/dart/site/try/poi/poi.dart b/dart/site/try/poi/poi.dart
index b8f530cb057fa26ddbf250f0f657305ce545942c..7c023d075de556114334f90154a5292487e6fd65 100644
--- a/dart/site/try/poi/poi.dart
+++ b/dart/site/try/poi/poi.dart
@@ -18,6 +18,7 @@ import 'package:dart2js_incremental/dart2js_incremental.dart' show
reuseCompiler;
import 'package:dart2js_incremental/library_updater.dart' show
+ IncrementalCompilerContext,
LibraryUpdater;
import 'package:compiler/src/source_file_provider.dart' show
@@ -406,8 +407,10 @@ Future<Element> runPoi(
}
Future<Compiler> invokeReuseCompiler() {
+ var context = new IncrementalCompilerContext();
updater = new LibraryUpdater(
- cachedCompiler, inputProvider, script, printWallClock, printVerbose);
+ cachedCompiler, inputProvider, printWallClock, printVerbose, context);
+ context.registerUriWithUpdates([script]);
return reuseCompiler(
diagnosticHandler: handler,
inputProvider: inputProvider,
@@ -431,7 +434,7 @@ Future<Element> runPoi(
if (!isCompiler) {
newCompiler.enqueuerFilter = new ScriptOnlyFilter(script);
}
- return runPoiInternal(newCompiler, sw, updater, position);
+ return runPoiInternal(newCompiler, sw, updater, script, position);
});
}
@@ -439,6 +442,7 @@ Future<Element> runPoiInternal(
Compiler newCompiler,
Stopwatch sw,
LibraryUpdater updater,
+ Uri uri,
int position) {
bool isFullCompile = cachedCompiler != newCompiler;
cachedCompiler = newCompiler;
@@ -464,7 +468,7 @@ Future<Element> runPoiInternal(
return !cachedCompiler.compilationFailed;
});
} else {
- compilation = cachedCompiler.run(updater.uri);
+ compilation = cachedCompiler.run(uri);
}
return compilation.then((success) {
« no previous file with comments | « dart/pkg/dart2js_incremental/lib/library_updater.dart ('k') | dart/tests/try/poi/apply_updates_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698