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

Side by Side Diff: pkg/front_end/lib/src/base/processed_options.dart

Issue 2877193003: Start actually adding incrementality into incremental kernel generator. (Closed)
Patch Set: Created 3 years, 7 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
OLDNEW
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:analyzer/src/summary/idl.dart'; 7 import 'package:analyzer/src/summary/idl.dart';
8 import 'package:front_end/compiler_options.dart'; 8 import 'package:front_end/compiler_options.dart';
9 import 'package:front_end/file_system.dart'; 9 import 'package:front_end/file_system.dart';
10 import 'package:front_end/src/fasta/translate_uri.dart'; 10 import 'package:front_end/src/fasta/translate_uri.dart';
11 import 'package:front_end/src/base/performace_logger.dart';
12 import 'package:front_end/src/incremental/byte_store.dart';
11 import 'package:package_config/packages_file.dart' as package_config; 13 import 'package:package_config/packages_file.dart' as package_config;
12 14
13 /// Wrapper around [CompilerOptions] which exposes the options in a form useful 15 /// Wrapper around [CompilerOptions] which exposes the options in a form useful
14 /// to the front end implementation. 16 /// to the front end implementation.
15 /// 17 ///
16 /// The intent is that the front end should immediately wrap any incoming 18 /// The intent is that the front end should immediately wrap any incoming
17 /// [CompilerOptions] object in this class before doing further processing, and 19 /// [CompilerOptions] object in this class before doing further processing, and
18 /// should thereafter access all options via the wrapper. This ensures that 20 /// should thereafter access all options via the wrapper. This ensures that
19 /// options are interpreted in a consistent way and that data derived from 21 /// options are interpreted in a consistent way and that data derived from
20 /// options is not unnecessarily recomputed. 22 /// options is not unnecessarily recomputed.
(...skipping 12 matching lines...) Expand all
33 /// The summary bundle for the SDK, or `null` if it has not been read yet. 35 /// The summary bundle for the SDK, or `null` if it has not been read yet.
34 PackageBundle _sdkSummary; 36 PackageBundle _sdkSummary;
35 37
36 /// The location of the SDK, or `null` if the location hasn't been determined 38 /// The location of the SDK, or `null` if the location hasn't been determined
37 /// yet. 39 /// yet.
38 Uri _sdkRoot; 40 Uri _sdkRoot;
39 41
40 /// Initializes a [ProcessedOptions] object wrapping the given [rawOptions]. 42 /// Initializes a [ProcessedOptions] object wrapping the given [rawOptions].
41 ProcessedOptions(CompilerOptions rawOptions) : this._raw = rawOptions; 43 ProcessedOptions(CompilerOptions rawOptions) : this._raw = rawOptions;
42 44
45 /// The logger to report compilation progress.
46 PerformanceLog get logger {
47 return _raw.logger;
48 }
49
50 /// The byte storage to get and put serialized data.
51 ByteStore get byteStore {
52 return _raw.byteStore;
53 }
54
43 /// Determine whether to generate code for the SDK when compiling a 55 /// Determine whether to generate code for the SDK when compiling a
44 /// whole-program. 56 /// whole-program.
45 bool get compileSdk => _raw.compileSdk; 57 bool get compileSdk => _raw.compileSdk;
46 58
47 /// Get the [FileSystem] which should be used by the front end to access 59 /// Get the [FileSystem] which should be used by the front end to access
48 /// files. 60 /// files.
49 /// 61 ///
50 /// If the client supplied roots using [CompilerOptions.multiRoots], the 62 /// If the client supplied roots using [CompilerOptions.multiRoots], the
51 /// returned [FileSystem] will automatically perform the appropriate mapping. 63 /// returned [FileSystem] will automatically perform the appropriate mapping.
52 FileSystem get fileSystem { 64 FileSystem get fileSystem {
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 throw new UnimplementedError(); 143 throw new UnimplementedError();
132 } 144 }
133 _sdkRoot = _raw.sdkRoot; 145 _sdkRoot = _raw.sdkRoot;
134 if (!_sdkRoot.path.endsWith('/')) { 146 if (!_sdkRoot.path.endsWith('/')) {
135 _sdkRoot = _sdkRoot.replace(path: _sdkRoot.path + '/'); 147 _sdkRoot = _sdkRoot.replace(path: _sdkRoot.path + '/');
136 } 148 }
137 } 149 }
138 return _sdkRoot; 150 return _sdkRoot;
139 } 151 }
140 } 152 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698