mirror of
https://github.com/dart-lang/sdk
synced 2024-09-23 09:13:31 +00:00
Make incremental compilation opt-in.
R=kasperl@google.com Review URL: https://codereview.chromium.org//344243002 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37604 260f80e4-7a28-3924-810f-c04153c831b5
This commit is contained in:
parent
e4a26ff290
commit
13c1d4ea13
|
@ -69,11 +69,12 @@ Compiler reuseCompiler(
|
|||
Compiler compiler = cachedCompiler;
|
||||
if (compiler == null ||
|
||||
compiler.libraryRoot != libraryRoot ||
|
||||
!compiler.hasIncrementalSupport ||
|
||||
compiler.hasCrashed ||
|
||||
compiler.compilerWasCancelled ||
|
||||
compiler.enqueuer.resolution.hasEnqueuedEverything ||
|
||||
compiler.deferredLoadTask.splitProgram) {
|
||||
if (compiler != null) {
|
||||
if (compiler != null && compiler.hasIncrementalSupport) {
|
||||
print('***FLUSH***');
|
||||
if (compiler.hasCrashed) {
|
||||
print('Unable to reuse compiler due to crash.');
|
||||
|
|
|
@ -33,6 +33,7 @@ import 'ui.dart' show
|
|||
|
||||
import 'settings.dart' show
|
||||
alwaysRunInWorker,
|
||||
incrementalCompilation,
|
||||
minified,
|
||||
onlyAnalyze,
|
||||
verboseCompiler;
|
||||
|
@ -98,13 +99,14 @@ class CompilationProcess {
|
|||
current = this;
|
||||
var options = [
|
||||
'--analyze-main',
|
||||
'--disable-type-inference',
|
||||
'--incremental-support',
|
||||
'--no-source-maps',
|
||||
];
|
||||
if (verboseCompiler) options.add('--verbose');
|
||||
if (minified) options.add('--minify');
|
||||
if (onlyAnalyze) options.add('--analyze-only');
|
||||
if (incrementalCompilation.value) {
|
||||
options.addAll(['--incremental-support', '--disable-type-inference']);
|
||||
}
|
||||
interaction.compilationStarting();
|
||||
compilerPort.send([['options', options], receivePort.sendPort]);
|
||||
receivePort.listen(onMessage);
|
||||
|
|
|
@ -32,4 +32,7 @@ const Map<String, dynamic> messages = const <String, dynamic> {
|
|||
|
||||
'theme':
|
||||
'Theme:',
|
||||
|
||||
'incrementalCompilation':
|
||||
'Enable incremental compilation (EXPERIMENTAL)',
|
||||
};
|
||||
|
|
|
@ -90,6 +90,9 @@ void set theme(String b) {
|
|||
const BooleanUserOption enableCodeCompletion =
|
||||
const BooleanUserOption('enableCodeCompletion', isHidden: true);
|
||||
|
||||
const BooleanUserOption incrementalCompilation =
|
||||
const BooleanUserOption('incrementalCompilation');
|
||||
|
||||
const List<UserOption> options = const <UserOption>[
|
||||
_alwaysRunInWorker,
|
||||
_verboseCompiler,
|
||||
|
@ -97,6 +100,7 @@ const List<UserOption> options = const <UserOption>[
|
|||
_onlyAnalyze,
|
||||
_enableDartMind,
|
||||
_compilationPaused,
|
||||
incrementalCompilation,
|
||||
_codeFont,
|
||||
_theme,
|
||||
_currentSample,
|
||||
|
|
Loading…
Reference in a new issue