OLD | NEW |
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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 /// If the future completes successfully, the previous file state is updated | 88 /// If the future completes successfully, the previous file state is updated |
89 /// and the set of valid sources is set to the set of all sources in the | 89 /// and the set of valid sources is set to the set of all sources in the |
90 /// program. | 90 /// program. |
91 /// | 91 /// |
92 /// If the future completes with an error (due to errors in the compiled | 92 /// If the future completes with an error (due to errors in the compiled |
93 /// source code), the caller may consider the previous file state and the set | 93 /// source code), the caller may consider the previous file state and the set |
94 /// of valid sources to be unchanged; this means that once the user fixes the | 94 /// of valid sources to be unchanged; this means that once the user fixes the |
95 /// errors, it is safe to call [computeDelta] again. | 95 /// errors, it is safe to call [computeDelta] again. |
96 Future<DeltaProgram> computeDelta({Future<Null> watch(Uri uri, bool used)}); | 96 Future<DeltaProgram> computeDelta({Future<Null> watch(Uri uri, bool used)}); |
97 | 97 |
98 /// Remove the file associated with the given file [uri] from the set of | 98 /// Remove any source file(s) associated with the given file path from the set |
99 /// valid files. This guarantees that those files will be re-read on the | 99 /// of valid sources. This guarantees that those files will be re-read on the |
100 /// next call to [computeDelta]). | 100 /// next call to [computeDelta]). |
101 void invalidate(Uri uri); | 101 /// |
| 102 /// TODO(scheglov) Update to use URI. |
| 103 void invalidate(String path); |
102 | 104 |
103 /// Remove all source files from the set of valid sources. This guarantees | 105 /// Remove all source files from the set of valid sources. This guarantees |
104 /// that all files will be re-read on the next call to [computeDelta]. | 106 /// that all files will be re-read on the next call to [computeDelta]. |
105 /// | 107 /// |
106 /// Note that this does not erase the previous program state; the next time | 108 /// Note that this does not erase the previous program state; the next time |
107 /// [computeDelta] is called, if parts of the program are discovered to be | 109 /// [computeDelta] is called, if parts of the program are discovered to be |
108 /// unchanged, parts of the previous program state will still be re-used to | 110 /// unchanged, parts of the previous program state will still be re-used to |
109 /// speed up compilation. | 111 /// speed up compilation. |
110 void invalidateAll(); | 112 void invalidateAll(); |
111 } | 113 } |
OLD | NEW |