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

Unified Diff: src/preparser.h

Issue 307393002: Misc cleanup (split from the "delay string / value internalization" CL). (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: fix (the amount of error reporting functions is too damn high!) Created 6 years, 7 months 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 | « src/parser.cc ('k') | src/utils.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/preparser.h
diff --git a/src/preparser.h b/src/preparser.h
index 909718ca9f2fe8829cde9b42b5c717c888b851b0..828f284c1648717b073bf125a54cb64a65ab6293 100644
--- a/src/preparser.h
+++ b/src/preparser.h
@@ -1234,8 +1234,7 @@ void ParserBase<Traits>::ReportUnexpectedToken(Token::Value token) {
default:
const char* name = Token::String(token);
ASSERT(name != NULL);
- Traits::ReportMessageAt(
- source_location, "unexpected_token", name);
+ Traits::ReportMessageAt(source_location, "unexpected_token", name);
}
}
@@ -1249,7 +1248,7 @@ typename ParserBase<Traits>::IdentifierT ParserBase<Traits>::ParseIdentifier(
IdentifierT name = this->GetSymbol(scanner());
if (allow_eval_or_arguments == kDontAllowEvalOrArguments &&
strict_mode() == STRICT && this->IsEvalOrArguments(name)) {
- ReportMessageAt(scanner()->location(), "strict_eval_arguments");
+ ReportMessage("strict_eval_arguments");
*ok = false;
}
return name;
@@ -1326,7 +1325,7 @@ typename ParserBase<Traits>::ExpressionT ParserBase<Traits>::ParseRegExpLiteral(
IdentifierT js_pattern = this->NextLiteralString(scanner(), TENURED);
if (!scanner()->ScanRegExpFlags()) {
Next();
- ReportMessageAt(scanner()->location(), "invalid_regexp_flags");
+ ReportMessage("invalid_regexp_flags");
*ok = false;
return Traits::EmptyExpression();
}
@@ -1669,7 +1668,7 @@ typename Traits::Type::ExpressionList ParserBase<Traits>::ParseArguments(
true, CHECK_OK_CUSTOM(NullExpressionList));
result->Add(argument, zone_);
if (result->length() > Code::kMaxArguments) {
- ReportMessageAt(scanner()->location(), "too_many_arguments");
+ ReportMessage("too_many_arguments");
*ok = false;
return this->NullExpressionList();
}
@@ -2152,17 +2151,14 @@ void ParserBase<Traits>::ObjectLiteralChecker::CheckProperty(
if (IsDataDataConflict(old_type, type)) {
// Both are data properties.
if (strict_mode_ == SLOPPY) return;
- parser()->ReportMessageAt(scanner()->location(),
- "strict_duplicate_property");
+ parser()->ReportMessage("strict_duplicate_property");
} else if (IsDataAccessorConflict(old_type, type)) {
// Both a data and an accessor property with the same name.
- parser()->ReportMessageAt(scanner()->location(),
- "accessor_data_property");
+ parser()->ReportMessage("accessor_data_property");
} else {
ASSERT(IsAccessorAccessorConflict(old_type, type));
// Both accessors of the same type.
- parser()->ReportMessageAt(scanner()->location(),
- "accessor_get_set");
+ parser()->ReportMessage("accessor_get_set");
}
*ok = false;
}
« no previous file with comments | « src/parser.cc ('k') | src/utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698