From: marja@chromium.org Date: Thu, 6 Feb 2014 10:16:25 +0000 (+0000) Subject: Follow-up to r19112. X-Git-Tag: upstream/4.7.83~10849 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=931fae7d1c10ab2f99ea312c13052582306d1251;p=platform%2Fupstream%2Fv8.git Follow-up to r19112. There's only one error message for "eval" and "arguments", so no need to pass it to PreParser::StrictModeIdentifierViolation. BUG=3126 LOG=N R=ulan@chromium.org Review URL: https://codereview.chromium.org/139713005 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19137 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- diff --git a/src/preparser.cc b/src/preparser.cc index 7d48dd8..4150d33 100644 --- a/src/preparser.cc +++ b/src/preparser.cc @@ -1058,7 +1058,6 @@ PreParser::Expression PreParser::ParseMemberWithNewPrefixesExpression( // is strict, we need to do an extra check. if (result.IsStrictFunction() && !identifier.IsValidStrictVariable()) { StrictModeIdentifierViolation(scanner()->location(), - "strict_eval_arguments", identifier, ok); return Expression::Default(); @@ -1496,8 +1495,7 @@ PreParser::Identifier PreParser::ParseIdentifier( PreParser::Identifier name = GetIdentifierSymbol(); if (allow_eval_or_arguments == kDontAllowEvalOrArguments && !is_classic_mode() && name.IsEvalOrArguments()) { - StrictModeIdentifierViolation( - scanner()->location(), "strict_eval_arguments", name, ok); + StrictModeIdentifierViolation(scanner()->location(), name, ok); } return name; } else if (is_classic_mode() && @@ -1546,10 +1544,9 @@ void PreParser::CheckDelayedStrictModeViolation(int beg_pos, void PreParser::StrictModeIdentifierViolation(Scanner::Location location, - const char* eval_args_type, Identifier identifier, bool* ok) { - const char* type = eval_args_type; + const char* type = "strict_eval_arguments"; if (identifier.IsFutureReserved()) { type = "unexpected_reserved"; } else if (identifier.IsFutureStrictReserved() || identifier.IsYield()) { diff --git a/src/preparser.h b/src/preparser.h index 0db902f..d0c7e3e 100644 --- a/src/preparser.h +++ b/src/preparser.h @@ -681,7 +681,6 @@ class PreParser : public ParserBase { void CheckDelayedStrictModeViolation(int beg_pos, int end_pos, bool* ok); void StrictModeIdentifierViolation(Scanner::Location, - const char* eval_args_type, Identifier identifier, bool* ok);