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:
ahe@google.com 2014-06-23 15:31:41 +00:00
parent e4a26ff290
commit 13c1d4ea13
4 changed files with 13 additions and 3 deletions

View file

@ -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.');

View file

@ -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);

View file

@ -32,4 +32,7 @@ const Map<String, dynamic> messages = const <String, dynamic> {
'theme':
'Theme:',
'incrementalCompilation':
'Enable incremental compilation (EXPERIMENTAL)',
};

View file

@ -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,