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

Side by Side Diff: pkg/front_end/lib/incremental_kernel_generator.dart

Issue 2869563002: Initial version of Fasta based IncrementalKernelGenerator. (Closed)
Patch Set: Created 3 years, 7 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 import 'dart:async'; 5 import 'dart:async';
6 6
7 import 'package:front_end/src/base/processed_options.dart'; 7 import 'package:front_end/src/base/processed_options.dart';
8 import 'package:front_end/src/incremental_kernel_generator_impl.dart'; 8 import 'package:front_end/src/incremental_kernel_generator_impl.dart';
9 import 'package:kernel/kernel.dart'; 9 import 'package:kernel/kernel.dart';
10 10
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 abstract class IncrementalKernelGenerator { 49 abstract class IncrementalKernelGenerator {
50 /// Creates an [IncrementalKernelGenerator] which is prepared to generate 50 /// Creates an [IncrementalKernelGenerator] which is prepared to generate
51 /// kernel representations of the program whose main library is in the given 51 /// kernel representations of the program whose main library is in the given
52 /// [source]. 52 /// [source].
53 /// 53 ///
54 /// No file system access is performed by this constructor; the initial 54 /// No file system access is performed by this constructor; the initial
55 /// "previous program state" is an empty program containing no code, and the 55 /// "previous program state" is an empty program containing no code, and the
56 /// initial set of valid sources is empty. To obtain a kernel representation 56 /// initial set of valid sources is empty. To obtain a kernel representation
57 /// of the program, call [computeDelta]. 57 /// of the program, call [computeDelta].
58 factory IncrementalKernelGenerator(Uri source, CompilerOptions options) => 58 factory IncrementalKernelGenerator(Uri source, CompilerOptions options) =>
59 new IncrementalKernelGeneratorImpl(source, new ProcessedOptions(options)); 59 new IncrementalKernelGeneratorImpl(source, options);
Paul Berry 2017/05/07 14:17:40 Why are you removing ProcessedOptions? Is there s
scheglov 2017/05/07 17:38:49 It seemed to me initially that ProcessedOptions is
60 60
61 /// Generates a kernel representation of the changes to the program, assuming 61 /// Generates a kernel representation of the changes to the program, assuming
62 /// that all valid sources are unchanged since the last call to 62 /// that all valid sources are unchanged since the last call to
63 /// [computeDelta]. 63 /// [computeDelta].
64 /// 64 ///
65 /// Source files in the set of valid sources are guaranteed not to be re-read 65 /// Source files in the set of valid sources are guaranteed not to be re-read
66 /// from disk; they are assumed to be unchanged regardless of the state of the 66 /// from disk; they are assumed to be unchanged regardless of the state of the
67 /// filesystem. 67 /// filesystem.
68 /// 68 ///
69 /// If [watch] is not `null`, then when a source file is first used 69 /// If [watch] is not `null`, then when a source file is first used
(...skipping 12 matching lines...) Expand all
82 /// 82 ///
83 /// If the future completes with an error (due to errors in the compiled 83 /// If the future completes with an error (due to errors in the compiled
84 /// source code), the caller may consider the previous file state and the set 84 /// source code), the caller may consider the previous file state and the set
85 /// of valid sources to be unchanged; this means that once the user fixes the 85 /// of valid sources to be unchanged; this means that once the user fixes the
86 /// errors, it is safe to call [computeDelta] again. 86 /// errors, it is safe to call [computeDelta] again.
87 Future<DeltaProgram> computeDelta({Future<Null> watch(Uri uri, bool used)}); 87 Future<DeltaProgram> computeDelta({Future<Null> watch(Uri uri, bool used)});
88 88
89 /// Remove any source file(s) associated with the given file path from the set 89 /// Remove any source file(s) associated with the given file path from the set
90 /// of valid sources. This guarantees that those files will be re-read on the 90 /// of valid sources. This guarantees that those files will be re-read on the
91 /// next call to [computeDelta]). 91 /// next call to [computeDelta]).
92 ///
93 /// TODO(scheglov) Update to use URI.
92 void invalidate(String path); 94 void invalidate(String path);
93 95
94 /// Remove all source files from the set of valid sources. This guarantees 96 /// Remove all source files from the set of valid sources. This guarantees
95 /// that all files will be re-read on the next call to [computeDelta]. 97 /// that all files will be re-read on the next call to [computeDelta].
96 /// 98 ///
97 /// Note that this does not erase the previous program state; the next time 99 /// Note that this does not erase the previous program state; the next time
98 /// [computeDelta] is called, if parts of the program are discovered to be 100 /// [computeDelta] is called, if parts of the program are discovered to be
99 /// unchanged, parts of the previous program state will still be re-used to 101 /// unchanged, parts of the previous program state will still be re-used to
100 /// speed up compilation. 102 /// speed up compilation.
101 void invalidateAll(); 103 void invalidateAll();
102 } 104 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698