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
This commit is contained in:
parent
dc30b11fbc
commit
e8ae83eec3
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user