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

Side by Side Diff: src/parser.cc

Issue 14837: Remove assertion expansion. (Closed)
Patch Set: Added a bugfix Created 12 years 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 unified diff | Download patch
« no previous file with comments | « src/jsregexp.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 4174 matching lines...) Expand 10 before | Expand all | Expand 10 after
4185 CharacterRange RegExpParser::ParseClassAtom(uc16* char_class) { 4185 CharacterRange RegExpParser::ParseClassAtom(uc16* char_class) {
4186 ASSERT_EQ(0, *char_class); 4186 ASSERT_EQ(0, *char_class);
4187 uc32 first = current(); 4187 uc32 first = current();
4188 if (first == '\\') { 4188 if (first == '\\') {
4189 switch (Next()) { 4189 switch (Next()) {
4190 case 'w': case 'W': case 'd': case 'D': case 's': case 'S': { 4190 case 'w': case 'W': case 'd': case 'D': case 's': case 'S': {
4191 *char_class = Next(); 4191 *char_class = Next();
4192 Advance(2); 4192 Advance(2);
4193 return CharacterRange::Singleton(0); // Return dummy value. 4193 return CharacterRange::Singleton(0); // Return dummy value.
4194 } 4194 }
4195 case kEndMarker:
4196 ReportError(CStrVector("\\ at end of pattern") CHECK_FAILED);
4195 default: 4197 default:
4196 uc32 c = ParseClassCharacterEscape(CHECK_FAILED); 4198 uc32 c = ParseClassCharacterEscape(CHECK_FAILED);
4197 return CharacterRange::Singleton(c); 4199 return CharacterRange::Singleton(c);
4198 } 4200 }
4199 } else { 4201 } else {
4200 Advance(); 4202 Advance();
4201 return CharacterRange::Singleton(first); 4203 return CharacterRange::Singleton(first);
4202 } 4204 }
4203 } 4205 }
4204 4206
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
4376 start_position, 4378 start_position,
4377 is_expression); 4379 is_expression);
4378 return result; 4380 return result;
4379 } 4381 }
4380 4382
4381 4383
4382 #undef NEW 4384 #undef NEW
4383 4385
4384 4386
4385 } } // namespace v8::internal 4387 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/jsregexp.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698