From e12ab4c3820f033f29d0e5da899876e43965a09b Mon Sep 17 00:00:00 2001 From: Clemens Hammacher Date: Mon, 8 Apr 2019 18:31:40 +0200 Subject: [PATCH] [flags] Remove reference to --js-arguments The --js-arguments flag is gone since https://crrev.com/c/1291469. This CL removes a remaining reference to that, and as a drive-by changes the proposed '--noflag' to '--no-flag'. R=petermarshall@chromium.org Bug: v8:8834 Change-Id: I69a8d008e87949d64329b4350197ba0651b54340 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1558087 Reviewed-by: Peter Marshall Commit-Queue: Clemens Hammacher Cr-Commit-Position: refs/heads/master@{#60720} --- src/flags.cc | 11 +++-------- src/flags.h | 4 ++-- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/src/flags.cc b/src/flags.cc index 8c2e91c397..d16c547c52 100644 --- a/src/flags.cc +++ b/src/flags.cc @@ -308,11 +308,7 @@ static void SplitArgument(const char* arg, char* buffer, int buffer_size, arg++; // remove 1st '-' if (*arg == '-') { arg++; // remove 2nd '-' - if (arg[0] == '\0') { - const char* kJSArgumentsFlagName = "js_arguments"; - *name = kJSArgumentsFlagName; - return; - } + DCHECK_NE('\0', arg[0]); // '--' arguments are handled in the caller. } if (arg[0] == 'n' && arg[1] == 'o') { arg += 2; // remove "no" @@ -587,11 +583,10 @@ void FlagList::PrintHelp() { "The following syntax for options is accepted (both '-' and '--' are " "ok):\n" " --flag (bool flags only)\n" - " --noflag (bool flags only)\n" + " --no-flag (bool flags only)\n" " --flag=value (non-bool flags only, no spaces around '=')\n" " --flag value (non-bool flags only)\n" - " -- (equivalent to --js_arguments, captures all remaining " - "args)\n\n" + " -- (captures all remaining args in JavaScript)\n\n" "Options:\n"; for (const Flag& f : flags) { diff --git a/src/flags.h b/src/flags.h index 7f4e842f69..d82c5b40d1 100644 --- a/src/flags.h +++ b/src/flags.h @@ -40,10 +40,10 @@ class V8_EXPORT_PRIVATE FlagList { // The following syntax for flags is accepted (both '-' and '--' are ok): // // --flag (bool flags only) - // --noflag (bool flags only) + // --no-flag (bool flags only) // --flag=value (non-bool flags only, no spaces around '=') // --flag value (non-bool flags only) - // -- (equivalent to --js_arguments, captures all remaining args) + // -- (capture all remaining args in JavaScript) static int SetFlagsFromCommandLine(int* argc, char** argv, bool remove_flags);