Commit 931fae7d authored by marja@chromium.org's avatar marja@chromium.org

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
parent e02a9d53
......@@ -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()) {
......
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment