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

Side by Side Diff: pkg/front_end/lib/compiler_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) 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 'dart:async'; 7 import 'dart:async';
8
9 import 'package:front_end/src/base/performace_logger.dart';
10 import 'package:front_end/src/incremental/byte_store.dart';
11
8 import 'compilation_error.dart'; 12 import 'compilation_error.dart';
9 import 'file_system.dart'; 13 import 'file_system.dart';
10 import 'physical_file_system.dart'; 14 import 'physical_file_system.dart';
11 import 'src/simple_error.dart'; 15 import 'src/simple_error.dart';
12 16
13 /// Default error handler used by [CompilerOptions.onError]. 17 /// Default error handler used by [CompilerOptions.onError].
14 void defaultErrorHandler(CompilationError error) => throw error; 18 void defaultErrorHandler(CompilationError error) => throw error;
15 19
16 /// Callback used to report errors encountered during compilation. 20 /// Callback used to report errors encountered during compilation.
17 typedef void ErrorHandler(CompilationError error); 21 typedef void ErrorHandler(CompilationError error);
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 Map<String, String> declaredVariables; 100 Map<String, String> declaredVariables;
97 101
98 /// The [FileSystem] which should be used by the front end to access files. 102 /// The [FileSystem] which should be used by the front end to access files.
99 /// 103 ///
100 /// All file system access performed by the front end goes through this 104 /// All file system access performed by the front end goes through this
101 /// mechanism, with one exception: if no value is specified for 105 /// mechanism, with one exception: if no value is specified for
102 /// [packagesFileUri], the packages file is located using the actual physical 106 /// [packagesFileUri], the packages file is located using the actual physical
103 /// file system. TODO(paulberry): fix this. 107 /// file system. TODO(paulberry): fix this.
104 FileSystem fileSystem = PhysicalFileSystem.instance; 108 FileSystem fileSystem = PhysicalFileSystem.instance;
105 109
110 /// The byte storage to get and put serialized data.
111 ByteStore byteStore = new NullByteStore();
112
113 /// The logger to report compilation progress.
114 PerformanceLog logger = new PerformanceLog(new StringBuffer());
115
106 /// Whether to generate code for the SDK when compiling a whole-program. 116 /// Whether to generate code for the SDK when compiling a whole-program.
107 bool compileSdk = false; 117 bool compileSdk = false;
108 118
109 /// Whether a modular build compiles only the files listed explicitly or if it 119 /// Whether a modular build compiles only the files listed explicitly or if it
110 /// compiles dependencies as well. 120 /// compiles dependencies as well.
111 /// 121 ///
112 /// This option is intended only for modular APIs like `kernelForBuildUnit`. 122 /// This option is intended only for modular APIs like `kernelForBuildUnit`.
113 /// These APIs by default ensure that builds are hermetic, where all files 123 /// These APIs by default ensure that builds are hermetic, where all files
114 /// that will be compiled are listed explicitly and all other dependencies 124 /// that will be compiled are listed explicitly and all other dependencies
115 /// are covered by summary files. 125 /// are covered by summary files.
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 return _report("SDK root directory not found: ${options.sdkRoot}"); 164 return _report("SDK root directory not found: ${options.sdkRoot}");
155 } 165 }
156 166
157 var summary = options.sdkSummary; 167 var summary = options.sdkSummary;
158 if (summary != null && !await fs.entityForUri(summary).exists()) { 168 if (summary != null && !await fs.entityForUri(summary).exists()) {
159 return _report("SDK summary not found: ${options.sdkSummary}"); 169 return _report("SDK summary not found: ${options.sdkSummary}");
160 } 170 }
161 171
162 return true; 172 return true;
163 } 173 }
OLDNEW
« no previous file with comments | « no previous file | pkg/front_end/lib/src/base/processed_options.dart » ('j') | pkg/front_end/lib/src/incremental/file_state.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698