Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(179)

Side by Side Diff: pkg/front_end/lib/compiler_options.dart

Issue 2426773004: First cut at a file system abstraction for the front end. (Closed)
Patch Set: Address code review comments Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | pkg/front_end/lib/file_system.dart » ('j') | pkg/front_end/lib/file_system.dart » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 9
9 /// Callback used to report errors encountered during compilation. 10 /// Callback used to report errors encountered during compilation.
10 typedef void ErrorHandler(CompilationError error); 11 typedef void ErrorHandler(CompilationError error);
11 12
12 /// Front-end options relevant to compiler back ends. 13 /// Front-end options relevant to compiler back ends.
13 /// 14 ///
14 /// TODO(paulberry): add a mechanism to allow file system operations to be
15 /// stubbed out for testing.
16 ///
17 /// Not intended to be implemented or extended by clients. 15 /// Not intended to be implemented or extended by clients.
18 class CompilerOptions { 16 class CompilerOptions {
19 /// The path to the Dart SDK. 17 /// The path to the Dart SDK.
20 /// 18 ///
21 /// If `null`, the SDK will be searched for using 19 /// If `null`, the SDK will be searched for using
22 /// [Platform.resolvedExecutable] as a starting point. 20 /// [Platform.resolvedExecutable] as a starting point.
23 /// 21 ///
24 /// This option is mutually exclusive with [sdkSummary]. 22 /// This option is mutually exclusive with [sdkSummary].
25 String sdkPath; 23 String sdkPath;
26 24
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 /// applied to the SDK. 81 /// applied to the SDK.
84 /// 82 ///
85 /// The value should be a power of two, and should match the `PLATFORM` bit 83 /// The value should be a power of two, and should match the `PLATFORM` bit
86 /// flags in sdk/lib/_internal/sdk_library_metadata/lib/libraries.dart. If 84 /// flags in sdk/lib/_internal/sdk_library_metadata/lib/libraries.dart. If
87 /// zero, no patch files will be applied. 85 /// zero, no patch files will be applied.
88 int platformBit; 86 int platformBit;
89 87
90 /// The declared variables for use by configurable imports and constant 88 /// The declared variables for use by configurable imports and constant
91 /// evaluation. 89 /// evaluation.
92 Map<String, String> declaredVariables; 90 Map<String, String> declaredVariables;
91
92 /// The [FileSystem] which should be used by the front end to access files.
93 ///
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
98 /// mechanism, with one exception: if no value is specified for
99 /// [packagesFilePath], the packages file is located using the actual physical
100 /// file system. TODO(paulberry): fix this.
101 FileSystem fileSystem;
93 } 102 }
OLDNEW
« no previous file with comments | « no previous file | pkg/front_end/lib/file_system.dart » ('j') | pkg/front_end/lib/file_system.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698