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

Unified Diff: src/parser.cc

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/list.h ('k') | src/preparser.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parser.cc
diff --git a/src/parser.cc b/src/parser.cc
index ed3e79c72e48e2b7284e1aba8b9d4571297dedff..369a451f350c543e3c193a5a332eb8c9e8fef0f0 100644
--- a/src/parser.cc
+++ b/src/parser.cc
@@ -2107,7 +2107,7 @@ Block* Parser::ParseVariableDeclarations(
Declare(declaration, mode != VAR, CHECK_OK);
nvars++;
if (declaration_scope->num_var_or_const() > kMaxNumFunctionLocals) {
- ReportMessageAt(scanner()->location(), "too_many_variables");
+ ReportMessage("too_many_variables");
*ok = false;
return NULL;
}
@@ -2405,7 +2405,7 @@ Statement* Parser::ParseContinueStatement(bool* ok) {
if (!label.is_null()) {
message = "unknown_label";
}
- ParserTraits::ReportMessageAt(scanner()->location(), message, label);
+ ParserTraits::ReportMessage(message, label);
*ok = false;
return NULL;
}
@@ -2441,7 +2441,7 @@ Statement* Parser::ParseBreakStatement(ZoneStringList* labels, bool* ok) {
if (!label.is_null()) {
message = "unknown_label";
}
- ParserTraits::ReportMessageAt(scanner()->location(), message, label);
+ ParserTraits::ReportMessage(message, label);
*ok = false;
return NULL;
}
@@ -3389,7 +3389,7 @@ FunctionLiteral* Parser::ParseFunctionLiteral(
scope_->DeclareParameter(param_name, VAR);
num_parameters++;
if (num_parameters > Code::kMaxArguments) {
- ReportMessageAt(scanner()->location(), "too_many_parameters");
+ ReportMessage("too_many_parameters");
*ok = false;
return NULL;
}
« no previous file with comments | « src/list.h ('k') | src/preparser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698