| 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 import 'dart:io'; | 6 import 'dart:io'; |
| 7 | 7 |
| 8 import 'package:front_end/file_system.dart'; | 8 import 'package:front_end/file_system.dart'; |
| 9 import 'package:front_end/incremental_kernel_generator.dart'; | 9 import 'package:front_end/incremental_kernel_generator.dart'; |
| 10 import 'package:front_end/src/base/api_signature.dart'; | 10 import 'package:front_end/src/base/api_signature.dart'; |
| (...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 270 saltBuilder.addInt(DATA_VERSION); | 270 saltBuilder.addInt(DATA_VERSION); |
| 271 saltBuilder.addBool(_options.strongMode); | 271 saltBuilder.addBool(_options.strongMode); |
| 272 saltBuilder.addString(_entryPoint.toString()); | 272 saltBuilder.addString(_entryPoint.toString()); |
| 273 _salt = saltBuilder.toByteList(); | 273 _salt = saltBuilder.toByteList(); |
| 274 } | 274 } |
| 275 | 275 |
| 276 /// Refresh all the invalidated files and update dependencies. | 276 /// Refresh all the invalidated files and update dependencies. |
| 277 Future<Null> _refreshInvalidatedFiles() async { | 277 Future<Null> _refreshInvalidatedFiles() async { |
| 278 await _logger.runAsync('Refresh invalidated files', () async { | 278 await _logger.runAsync('Refresh invalidated files', () async { |
| 279 for (var fileUri in _invalidatedFiles) { | 279 for (var fileUri in _invalidatedFiles) { |
| 280 var file = await _fsState.getFile(fileUri); | 280 var file = _fsState.getFileByFileUri(fileUri); |
| 281 await file.refresh(); | 281 if (file != null) { |
| 282 _logger.writeln('Refresh $fileUri'); |
| 283 await file.refresh(); |
| 284 } |
| 282 } | 285 } |
| 283 _invalidatedFiles.clear(); | 286 _invalidatedFiles.clear(); |
| 284 }); | 287 }); |
| 285 } | 288 } |
| 286 | 289 |
| 287 List<int> _writeProgramBytes(Program program, bool filter(Library library)) { | 290 List<int> _writeProgramBytes(Program program, bool filter(Library library)) { |
| 288 ByteSink byteSink = new ByteSink(); | 291 ByteSink byteSink = new ByteSink(); |
| 289 new LimitedBinaryPrinter(byteSink, filter).writeProgramFile(program); | 292 new LimitedBinaryPrinter(byteSink, filter).writeProgramFile(program); |
| 290 return byteSink.builder.takeBytes(); | 293 return byteSink.builder.takeBytes(); |
| 291 } | 294 } |
| (...skipping 11 matching lines...) Expand all Loading... |
| 303 /// TODO(scheglov) Use API signatures. | 306 /// TODO(scheglov) Use API signatures. |
| 304 /// TODO(scheglov) Or use tree shaking and compute signatures of outlines. | 307 /// TODO(scheglov) Or use tree shaking and compute signatures of outlines. |
| 305 final String signature; | 308 final String signature; |
| 306 | 309 |
| 307 /// Kernel libraries for libraries in the [cycle]. Bodies of dependencies | 310 /// Kernel libraries for libraries in the [cycle]. Bodies of dependencies |
| 308 /// are not included, but but references to those dependencies are included. | 311 /// are not included, but but references to those dependencies are included. |
| 309 final List<Library> kernelLibraries; | 312 final List<Library> kernelLibraries; |
| 310 | 313 |
| 311 _LibraryCycleResult(this.cycle, this.signature, this.kernelLibraries); | 314 _LibraryCycleResult(this.cycle, this.signature, this.kernelLibraries); |
| 312 } | 315 } |
| OLD | NEW |