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

Unified Diff: dart/site/try/poi/poi.dart

Issue 615573004: Add --compile option to poi.dart. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fixed bad merge. Created 6 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/site/try/poi/poi.dart
diff --git a/dart/site/try/poi/poi.dart b/dart/site/try/poi/poi.dart
index 478d9b1b23eb6c37d63bdd5ed60ff9f8212a2fe8..6993d1e0c6cd1565f307897caff52daaf3b77f28 100644
--- a/dart/site/try/poi/poi.dart
+++ b/dart/site/try/poi/poi.dart
@@ -89,6 +89,10 @@ int globalCounter = 0;
/// really need.
bool isVerbose = false;
+/// Enabled by the option --compile. Also compiles the program after analyzing
+/// the POI.
+bool isCompiler = false;
+
/// When true (the default value) print serialized scope information at the
/// provided position.
const bool PRINT_SCOPE_INFO =
@@ -150,6 +154,9 @@ main(List<String> arguments) {
case '--verbose':
isVerbose = true;
break;
+ case '--compile':
+ isCompiler = true;
+ break;
default:
throw 'Unknown option: $argument.';
}
@@ -365,7 +372,6 @@ Future<Element> runPoi(
var options = [
'--analyze-main',
- '--analyze-only',
'--no-source-maps',
'--verbose',
'--categories=Client,Server',
@@ -373,6 +379,10 @@ Future<Element> runPoi(
'--disable-type-inference',
];
+ if (!isCompiler) {
+ options.add('--analyze-only');
+ }
+
LibraryUpdater updater =
new LibraryUpdater(
cachedCompiler, inputProvider, script, printWallClock, printVerbose);
@@ -389,8 +399,9 @@ Future<Element> runPoi(
packageRoot: packageRoot,
packagesAreImmutable: true,
reuseLibrary: reuseLibrary).then((Compiler newCompiler) {
- var filter = new ScriptOnlyFilter(script);
- newCompiler.enqueuerFilter = filter;
+ if (!isCompiler) {
+ newCompiler.enqueuerFilter = new ScriptOnlyFilter(script);
+ }
return runPoiInternal(newCompiler, sw, updater, position);
});
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698