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

Side by Side Diff: dart/site/try/src/compilation.dart

Issue 344243002: Make incremental compilation opt-in. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Merged with r37603. Created 6 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « dart/site/try/src/caching_compiler.dart ('k') | dart/site/try/src/messages.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 trydart.compilation; 5 library trydart.compilation;
6 6
7 import 'dart:html' show 7 import 'dart:html' show
8 Blob, 8 Blob,
9 Element, 9 Element,
10 ErrorEvent, 10 ErrorEvent,
(...skipping 15 matching lines...) Expand all
26 makeOutputFrame; 26 makeOutputFrame;
27 27
28 import 'ui.dart' show 28 import 'ui.dart' show
29 buildButton, 29 buildButton,
30 interaction, 30 interaction,
31 outputDiv, 31 outputDiv,
32 outputFrame; 32 outputFrame;
33 33
34 import 'settings.dart' show 34 import 'settings.dart' show
35 alwaysRunInWorker, 35 alwaysRunInWorker,
36 incrementalCompilation,
36 minified, 37 minified,
37 onlyAnalyze, 38 onlyAnalyze,
38 verboseCompiler; 39 verboseCompiler;
39 40
40 import 'iframe_error_handler.dart' show 41 import 'iframe_error_handler.dart' show
41 errorStream; 42 errorStream;
42 43
43 /** 44 /**
44 * Scheme for recognizing files stored in memory. 45 * Scheme for recognizing files stored in memory.
45 * 46 *
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 92
92 void start() { 93 void start() {
93 if (!shouldStartCompilation()) { 94 if (!shouldStartCompilation()) {
94 receivePort.close(); 95 receivePort.close();
95 return; 96 return;
96 } 97 }
97 if (current != null) current.dispose(); 98 if (current != null) current.dispose();
98 current = this; 99 current = this;
99 var options = [ 100 var options = [
100 '--analyze-main', 101 '--analyze-main',
101 '--disable-type-inference',
102 '--incremental-support',
103 '--no-source-maps', 102 '--no-source-maps',
104 ]; 103 ];
105 if (verboseCompiler) options.add('--verbose'); 104 if (verboseCompiler) options.add('--verbose');
106 if (minified) options.add('--minify'); 105 if (minified) options.add('--minify');
107 if (onlyAnalyze) options.add('--analyze-only'); 106 if (onlyAnalyze) options.add('--analyze-only');
107 if (incrementalCompilation.value) {
108 options.addAll(['--incremental-support', '--disable-type-inference']);
109 }
108 interaction.compilationStarting(); 110 interaction.compilationStarting();
109 compilerPort.send([['options', options], receivePort.sendPort]); 111 compilerPort.send([['options', options], receivePort.sendPort]);
110 receivePort.listen(onMessage); 112 receivePort.listen(onMessage);
111 compilerPort.send([source, receivePort.sendPort]); 113 compilerPort.send([source, receivePort.sendPort]);
112 } 114 }
113 115
114 void dispose() { 116 void dispose() {
115 if (worker != null) worker.terminate(); 117 if (worker != null) worker.terminate();
116 objectUrls.forEach(Url.revokeObjectUrl); 118 objectUrls.forEach(Url.revokeObjectUrl);
117 } 119 }
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 if (seenMessages.add('$begin:$end: [$kind] $message')) { 252 if (seenMessages.add('$begin:$end: [$kind] $message')) {
251 // Guard against duplicated messages. 253 // Guard against duplicated messages.
252 addDiagnostic(kind, message, begin, end); 254 addDiagnostic(kind, message, begin, end);
253 } 255 }
254 } 256 }
255 257
256 onCrash(data) { 258 onCrash(data) {
257 interaction.consolePrintLine(data); 259 interaction.consolePrintLine(data);
258 } 260 }
259 } 261 }
OLDNEW
« no previous file with comments | « dart/site/try/src/caching_compiler.dart ('k') | dart/site/try/src/messages.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698