Reviewers: Christian Plesner Hansen, Description: Added option --shell to D8 and updated the usage text.
Please review this at http://codereview.chromium.org/14192 SVN Base: http://v8.googlecode.com/svn/branches/bleeding_edge/ Affected files: M src/d8.cc M src/flags.cc Index: src/flags.cc =================================================================== --- src/flags.cc (revision 984) +++ src/flags.cc (working copy) @@ -516,10 +516,11 @@ printf(" shell [options] file1 file2 ... filek\n"); printf(" run JavaScript scripts in file1, file2, ..., filek\n"); printf(" shell [options]\n"); - printf(" shell [options] --shell\n"); - printf(" run an interactive JavaScript shell"); - printf(" d8 [options] file\n"); + printf(" shell [options] --shell [file1 file2 ... filek]\n"); + printf(" run an interactive JavaScript shell\n"); + printf(" d8 [options] file1 file2 ... filek\n"); printf(" d8 [options]\n"); + printf(" d8 [options] --shell [file1 file2 ... filek]\n"); printf(" run the new debugging shell\n\n"); printf("Options:\n"); for (size_t i = 0; i < num_flags; ++i) { Index: src/d8.cc =================================================================== --- src/d8.cc (revision 984) +++ src/d8.cc (working copy) @@ -388,7 +388,9 @@ Context::Scope context_scope(evaluation_context_); for (int i = 1; i < argc; i++) { char* str = argv[i]; - if (strcmp(str, "-f") == 0) { + if (strcmp(str, "--shell") == 0) { + run_shell = true; + } else if (strcmp(str, "-f") == 0) { // Ignore any -f flags for compatibility with other stand-alone // JavaScript engines. continue; --~--~---------~--~----~------------~-------~--~----~ v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev -~----------~----~----~----~------~----~------~--~---
