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

Unified Diff: pkg/front_end/example/incremental_reload/compiler_with_invalidation.dart

Issue 2931183003: Implement promised watch behaviour for used == true. (Closed)
Patch Set: Created 3 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: pkg/front_end/example/incremental_reload/compiler_with_invalidation.dart
diff --git a/pkg/front_end/example/incremental_reload/compiler_with_invalidation.dart b/pkg/front_end/example/incremental_reload/compiler_with_invalidation.dart
index 3a299cb6bff08fa4fb0598a26205b18cfe3b3cd8..69de0d40f3c8323544f351f093d369dac1c57623 100644
--- a/pkg/front_end/example/incremental_reload/compiler_with_invalidation.dart
+++ b/pkg/front_end/example/incremental_reload/compiler_with_invalidation.dart
@@ -64,11 +64,13 @@ class IncrementalCompiler {
/// Create an instance of [IncrementalCompiler].
static Future<IncrementalCompiler> create(
CompilerOptions options, Uri entryUri) async {
- return new IncrementalCompiler._internal(
- await IncrementalKernelGenerator.newInstance(options, entryUri));
+ var compiler = new IncrementalCompiler._internal();
+ compiler._generator = await IncrementalKernelGenerator
+ .newInstance(options, entryUri, watch: compiler._watch);
+ return compiler;
}
- IncrementalCompiler._internal(this._generator);
+ IncrementalCompiler._internal();
/// Callback for the [IncrementalKernelGenerator] to keep track of relevant
/// files.
@@ -114,7 +116,7 @@ class IncrementalCompiler {
if (changed == 0 && lastModified.isNotEmpty) return null;
var compileTimer = new Stopwatch()..start();
- var delta = await _generator.computeDelta(watch: _watch);
+ var delta = await _generator.computeDelta();
compileTimer.stop();
compileTime = compileTimer.elapsedMilliseconds;
var program = delta.newProgram;

Powered by Google App Engine
This is Rietveld 408576698