| 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 import 'physical_file_system.dart'; |
| 10 | 10 |
| 11 /// Default error handler used by [CompielerOptions.onError]. | 11 /// Default error handler used by [CompilerOptions.onError]. |
| 12 void defaultErrorHandler(CompilationError error) => throw error; | 12 void defaultErrorHandler(CompilationError error) => throw error; |
| 13 | 13 |
| 14 /// Callback used to report errors encountered during compilation. | 14 /// Callback used to report errors encountered during compilation. |
| 15 typedef void ErrorHandler(CompilationError error); | 15 typedef void ErrorHandler(CompilationError error); |
| 16 | 16 |
| 17 /// Front-end options relevant to compiler back ends. | 17 /// Front-end options relevant to compiler back ends. |
| 18 /// | 18 /// |
| 19 /// Not intended to be implemented or extended by clients. | 19 /// Not intended to be implemented or extended by clients. |
| 20 class CompilerOptions { | 20 class CompilerOptions { |
| 21 /// The URI of the root of the Dart SDK (typically a "file:" URI). | 21 /// The URI of the root of the Dart SDK (typically a "file:" URI). |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 /// | 105 /// |
| 106 /// This option is intended only for modular APIs like `kernelForBuildUnit`. | 106 /// This option is intended only for modular APIs like `kernelForBuildUnit`. |
| 107 /// These APIs by default ensure that builds are hermetic, where all files | 107 /// These APIs by default ensure that builds are hermetic, where all files |
| 108 /// that will be compiled are listed explicitly and all other dependencies | 108 /// that will be compiled are listed explicitly and all other dependencies |
| 109 /// are covered by summary files. | 109 /// are covered by summary files. |
| 110 /// | 110 /// |
| 111 /// When this option is true, these APIs will treat any dependency that is | 111 /// When this option is true, these APIs will treat any dependency that is |
| 112 /// not described in a summary as if it was explictly listed as an input. | 112 /// not described in a summary as if it was explictly listed as an input. |
| 113 bool chaseDependencies = false; | 113 bool chaseDependencies = false; |
| 114 | 114 |
| 115 /// Whether to intepret Dart sources in strong-mode. | 115 /// Whether to interpret Dart sources in strong-mode. |
| 116 bool strongMode = true; | 116 bool strongMode = true; |
| 117 | 117 |
| 118 // All options below are target-specific options. | 118 // All options below are target-specific options. |
| 119 // | 119 // |
| 120 // TODO(sigmund): revisit the right layout for these options. We might want to | 120 // TODO(sigmund): revisit the right layout for these options. We might want to |
| 121 // split them out into a separate bag of options or provide factories for | 121 // split them out into a separate bag of options or provide factories for |
| 122 // common combinations of these options. | 122 // common combinations of these options. |
| 123 | 123 |
| 124 /// Patch files to apply on the core libraries for a specific target platform. | 124 /// Patch files to apply on the core libraries for a specific target platform. |
| 125 /// | 125 /// |
| 126 /// Keys on this map are expected to be `dart:*` URIs. The values can be | 126 /// Keys on this map are expected to be `dart:*` URIs. The values can be |
| 127 /// either absolute or relative URIs. Absolute URIs are read directly, while | 127 /// either absolute or relative URIs. Absolute URIs are read directly, while |
| 128 /// relative URIs are resolved from the [sdkRoot]. | 128 /// relative URIs are resolved from the [sdkRoot]. |
| 129 Map<Uri, List<Uri>> targetPatches = {}; | 129 Map<Uri, List<Uri>> targetPatches = {}; |
| 130 } | 130 } |
| OLD | NEW |