| OLD | NEW |
| 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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 library front_end.compiler_options; | 5 library front_end.compiler_options; |
| 6 | 6 |
| 7 import 'compilation_error.dart'; | 7 import 'compilation_error.dart'; |
| 8 import 'file_system.dart'; | 8 import 'file_system.dart'; |
| 9 import 'physical_file_system.dart'; |
| 9 | 10 |
| 10 /// Callback used to report errors encountered during compilation. | 11 /// Callback used to report errors encountered during compilation. |
| 11 typedef void ErrorHandler(CompilationError error); | 12 typedef void ErrorHandler(CompilationError error); |
| 12 | 13 |
| 13 /// Front-end options relevant to compiler back ends. | 14 /// Front-end options relevant to compiler back ends. |
| 14 /// | 15 /// |
| 15 /// Not intended to be implemented or extended by clients. | 16 /// Not intended to be implemented or extended by clients. |
| 16 class CompilerOptions { | 17 class CompilerOptions { |
| 17 /// The path to the Dart SDK. | 18 /// The path to the Dart SDK. |
| 18 /// | 19 /// |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 /// flags in sdk/lib/_internal/sdk_library_metadata/lib/libraries.dart. If | 85 /// flags in sdk/lib/_internal/sdk_library_metadata/lib/libraries.dart. If |
| 85 /// zero, no patch files will be applied. | 86 /// zero, no patch files will be applied. |
| 86 int platformBit; | 87 int platformBit; |
| 87 | 88 |
| 88 /// The declared variables for use by configurable imports and constant | 89 /// The declared variables for use by configurable imports and constant |
| 89 /// evaluation. | 90 /// evaluation. |
| 90 Map<String, String> declaredVariables; | 91 Map<String, String> declaredVariables; |
| 91 | 92 |
| 92 /// The [FileSystem] which should be used by the front end to access files. | 93 /// The [FileSystem] which should be used by the front end to access files. |
| 93 /// | 94 /// |
| 94 /// TODO(paulberry): once an implementation of [FileSystem] has been created | |
| 95 /// which uses the actual physical file system, make that the default. | |
| 96 /// | |
| 97 /// All file system access performed by the front end goes through this | 95 /// All file system access performed by the front end goes through this |
| 98 /// mechanism, with one exception: if no value is specified for | 96 /// mechanism, with one exception: if no value is specified for |
| 99 /// [packagesFilePath], the packages file is located using the actual physical | 97 /// [packagesFilePath], the packages file is located using the actual physical |
| 100 /// file system. TODO(paulberry): fix this. | 98 /// file system. TODO(paulberry): fix this. |
| 101 FileSystem fileSystem; | 99 FileSystem fileSystem = PhysicalFileSystem.instance; |
| 102 } | 100 } |
| OLD | NEW |