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/file_system.dart'; | 7 import 'package:front_end/file_system.dart'; |
8 import 'package:front_end/src/base/api_signature.dart'; | 8 import 'package:front_end/src/base/api_signature.dart'; |
9 import 'package:front_end/src/base/performace_logger.dart'; | 9 import 'package:front_end/src/base/performace_logger.dart'; |
10 import 'package:front_end/src/base/processed_options.dart'; | 10 import 'package:front_end/src/base/processed_options.dart'; |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 _fileAddedFn = fileAddedFn { | 98 _fileAddedFn = fileAddedFn { |
99 _computeSalt(); | 99 _computeSalt(); |
100 | 100 |
101 Future<Null> onFileAdded(Uri uri) { | 101 Future<Null> onFileAdded(Uri uri) { |
102 if (_fileAddedFn != null) { | 102 if (_fileAddedFn != null) { |
103 return _fileAddedFn(uri); | 103 return _fileAddedFn(uri); |
104 } | 104 } |
105 return new Future.value(); | 105 return new Future.value(); |
106 } | 106 } |
107 | 107 |
108 _fsState = new FileSystemState( | 108 _fsState = new FileSystemState(_byteStore, _fileSystem, _options.target, |
109 _byteStore, _fileSystem, _uriTranslator, _salt, onFileAdded); | 109 _uriTranslator, _salt, onFileAdded); |
110 } | 110 } |
111 | 111 |
112 /// Return the [FileSystemState] that contains the current file state. | 112 /// Return the [FileSystemState] that contains the current file state. |
113 FileSystemState get fsState => _fsState; | 113 FileSystemState get fsState => _fsState; |
114 | 114 |
115 /// Return the object that provides additional information for tests. | 115 /// Return the object that provides additional information for tests. |
116 @visibleForTesting | 116 @visibleForTesting |
117 _TestView get test => _testView; | 117 _TestView get test => _testView; |
118 | 118 |
119 /// Return the [KernelResult] for the Dart file with the given [uri]. | 119 /// Return the [KernelResult] for the Dart file with the given [uri]. |
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
419 | 419 |
420 LibraryCycleResult(this.cycle, this.signature, this.kernelLibraries); | 420 LibraryCycleResult(this.cycle, this.signature, this.kernelLibraries); |
421 } | 421 } |
422 | 422 |
423 @visibleForTesting | 423 @visibleForTesting |
424 class _TestView { | 424 class _TestView { |
425 /// The list of [LibraryCycle]s compiled for the last delta. | 425 /// The list of [LibraryCycle]s compiled for the last delta. |
426 /// It does not include libraries which were read from the cache. | 426 /// It does not include libraries which were read from the cache. |
427 final List<LibraryCycle> compiledCycles = []; | 427 final List<LibraryCycle> compiledCycles = []; |
428 } | 428 } |
OLD | NEW |