| 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/incremental_kernel_generator.dart'; | 7 import 'package:front_end/incremental_kernel_generator.dart'; |
| 8 import 'package:front_end/src/base/performace_logger.dart'; | 8 import 'package:front_end/src/base/performace_logger.dart'; |
| 9 import 'package:front_end/src/base/processed_options.dart'; | 9 import 'package:front_end/src/base/processed_options.dart'; |
| 10 import 'package:front_end/src/fasta/uri_translator.dart'; | 10 import 'package:front_end/src/fasta/uri_translator.dart'; |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 | 124 |
| 125 return new DeltaProgram(program); | 125 return new DeltaProgram(program); |
| 126 }); | 126 }); |
| 127 } | 127 } |
| 128 | 128 |
| 129 @override | 129 @override |
| 130 void invalidate(Uri uri) { | 130 void invalidate(Uri uri) { |
| 131 _driver.invalidate(uri); | 131 _driver.invalidate(uri); |
| 132 } | 132 } |
| 133 | 133 |
| 134 @override | |
| 135 void invalidateAll() { | |
| 136 _driver.invalidateAll(); | |
| 137 } | |
| 138 | |
| 139 /// TODO(scheglov) document | 134 /// TODO(scheglov) document |
| 140 Future<Null> _gc() async { | 135 Future<Null> _gc() async { |
| 141 var removedFiles = _driver.fsState.gc(_entryPoint); | 136 var removedFiles = _driver.fsState.gc(_entryPoint); |
| 142 if (removedFiles.isNotEmpty && _watchFn != null) { | 137 if (removedFiles.isNotEmpty && _watchFn != null) { |
| 143 for (var removedFile in removedFiles) { | 138 for (var removedFile in removedFiles) { |
| 144 await _watchFn(removedFile.fileUri, false); | 139 await _watchFn(removedFile.fileUri, false); |
| 145 } | 140 } |
| 146 } | 141 } |
| 147 } | 142 } |
| 148 } | 143 } |
| 149 | 144 |
| 150 @visibleForTesting | 145 @visibleForTesting |
| 151 class _TestView { | 146 class _TestView { |
| 152 final IncrementalKernelGeneratorImpl _generator; | 147 final IncrementalKernelGeneratorImpl _generator; |
| 153 | 148 |
| 154 _TestView(this._generator); | 149 _TestView(this._generator); |
| 155 | 150 |
| 156 /// The [KernelDriver] that is used to actually compile. | 151 /// The [KernelDriver] that is used to actually compile. |
| 157 KernelDriver get driver => _generator._driver; | 152 KernelDriver get driver => _generator._driver; |
| 158 } | 153 } |
| OLD | NEW |