Remove a few occurrences of the CHECK_FAILED macro in the parser.

There's no reason to check if we've failed when (a) we know we have
and (b) we've got a perfectly good NULL just lying around anyway.

Review URL: http://codereview.chromium.org/155920

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2522 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent dc30b11f
......@@ -3931,7 +3931,7 @@ RegExpTree* RegExpParser::ParseDisjunction() {
case '*':
case '+':
case '?':
ReportError(CStrVector("Nothing to repeat") CHECK_FAILED);
return ReportError(CStrVector("Nothing to repeat"));
case '^': {
Advance();
if (multiline_) {
......@@ -4006,7 +4006,7 @@ RegExpTree* RegExpParser::ParseDisjunction() {
case '\\':
switch (Next()) {
case kEndMarker:
ReportError(CStrVector("\\ at end of pattern") CHECK_FAILED);
return ReportError(CStrVector("\\ at end of pattern"));
case 'b':
Advance(2);
builder->AddAssertion(
......@@ -4493,7 +4493,7 @@ CharacterRange RegExpParser::ParseClassAtom(uc16* char_class) {
return CharacterRange::Singleton(0); // Return dummy value.
}
case kEndMarker:
ReportError(CStrVector("\\ at end of pattern") CHECK_FAILED);
return ReportError(CStrVector("\\ at end of pattern"));
default:
uc32 c = ParseClassCharacterEscape(CHECK_FAILED);
return CharacterRange::Singleton(c);
......
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