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

Unified Diff: runtime/bin/gen_snapshot.cc

Issue 11446018: Fix for issue 6768 (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years 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: runtime/bin/gen_snapshot.cc
===================================================================
--- runtime/bin/gen_snapshot.cc (revision 15751)
+++ runtime/bin/gen_snapshot.cc (working copy)
@@ -135,6 +135,11 @@
*script_name = NULL;
}
+ if (snapshot_filename == NULL) {
+ Log::PrintErr("No snapshot output file specified.\n\n");
+ return -1;
+ }
+
return 0;
}
@@ -358,7 +363,29 @@
static void PrintUsage() {
- Log::PrintErr("dart [<vm-flags>] [<dart-script-file>]\n");
+ Log::PrintErr(
+"Usage:\n"
+"\n"
+" gen_snapshot [<vm-flags>] [<options>] \\\n"
+" {--script_snapshot=<out-file> | --snapshot=<out-file>} \\\n"
+" [<dart-script-file>]\n"
+"\n"
+" Writes a snapshot of <dart-script-file> to <out-file>. If no\n"
+" <dart-script-file> is passed, a generic snapshot of all the corelibs is\n"
+" created. One of the following is required:\n"
+"\n"
+" --script_snapshot=<file> Generates a script snapshot.\n"
+" --snapshot=<file> Generates a complete snapshot. Uses the url\n"
+" mapping specified on the command line to load\n"
+" the libraries.\n"
+"Supported options:\n"
+"\n"
+"--package_root=<path>\n"
+" Where to find packages, that is, \"package:...\" imports.\n"
+"\n"
+"--url_mapping=<mapping>\n"
+" Uses the URL mapping(s) specified on the command line to load the\n"
+" libraries. For use only with --snapshot=.\n");
}
@@ -447,11 +474,6 @@
return 255;
}
- if (snapshot_filename == NULL) {
- Log::PrintErr("No snapshot output file specified\n");
- return 255;
- }
-
DartUtils::SetOriginalWorkingDirectory();
Dart_SetVMFlags(vm_options.count(), vm_options.arguments());
« 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