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

Side by Side Diff: src/arm/regexp-macro-assembler-arm.cc

Issue 9965010: Regexp: Improve the speed that we scan for an initial point where a non-anchored (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 8 years, 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | src/ia32/regexp-macro-assembler-ia32.cc » ('j') | src/jsregexp.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 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 434 matching lines...) Expand 10 before | Expand all | Expand 10 after
445 void RegExpMacroAssemblerARM::CheckNotCharacter(unsigned c, 445 void RegExpMacroAssemblerARM::CheckNotCharacter(unsigned c,
446 Label* on_not_equal) { 446 Label* on_not_equal) {
447 __ cmp(current_character(), Operand(c)); 447 __ cmp(current_character(), Operand(c));
448 BranchOrBacktrack(ne, on_not_equal); 448 BranchOrBacktrack(ne, on_not_equal);
449 } 449 }
450 450
451 451
452 void RegExpMacroAssemblerARM::CheckCharacterAfterAnd(uint32_t c, 452 void RegExpMacroAssemblerARM::CheckCharacterAfterAnd(uint32_t c,
453 uint32_t mask, 453 uint32_t mask,
454 Label* on_equal) { 454 Label* on_equal) {
455 __ and_(r0, current_character(), Operand(mask)); 455 if (c == 0) {
456 __ cmp(r0, Operand(c)); 456 __ tst(current_character(), Operand(mask));
457 } else {
458 __ and_(r0, current_character(), Operand(mask));
459 __ cmp(r0, Operand(c));
460 }
457 BranchOrBacktrack(eq, on_equal); 461 BranchOrBacktrack(eq, on_equal);
458 } 462 }
459 463
460 464
461 void RegExpMacroAssemblerARM::CheckNotCharacterAfterAnd(unsigned c, 465 void RegExpMacroAssemblerARM::CheckNotCharacterAfterAnd(unsigned c,
462 unsigned mask, 466 unsigned mask,
463 Label* on_not_equal) { 467 Label* on_not_equal) {
464 __ and_(r0, current_character(), Operand(mask)); 468 if (c == 0) {
465 __ cmp(r0, Operand(c)); 469 __ tst(current_character(), Operand(mask));
470 } else {
471 __ and_(r0, current_character(), Operand(mask));
472 __ cmp(r0, Operand(c));
473 }
466 BranchOrBacktrack(ne, on_not_equal); 474 BranchOrBacktrack(ne, on_not_equal);
467 } 475 }
468 476
469 477
470 void RegExpMacroAssemblerARM::CheckNotCharacterAfterMinusAnd( 478 void RegExpMacroAssemblerARM::CheckNotCharacterAfterMinusAnd(
471 uc16 c, 479 uc16 c,
472 uc16 minus, 480 uc16 minus,
473 uc16 mask, 481 uc16 mask,
474 Label* on_not_equal) { 482 Label* on_not_equal) {
475 ASSERT(minus < String::kMaxUtf16CodeUnit); 483 ASSERT(minus < String::kMaxUtf16CodeUnit);
(...skipping 866 matching lines...) Expand 10 before | Expand all | Expand 10 after
1342 __ ldr(pc, MemOperand(sp, stack_alignment, PostIndex)); 1350 __ ldr(pc, MemOperand(sp, stack_alignment, PostIndex));
1343 } 1351 }
1344 1352
1345 #undef __ 1353 #undef __
1346 1354
1347 #endif // V8_INTERPRETED_REGEXP 1355 #endif // V8_INTERPRETED_REGEXP
1348 1356
1349 }} // namespace v8::internal 1357 }} // namespace v8::internal
1350 1358
1351 #endif // V8_TARGET_ARCH_ARM 1359 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | src/ia32/regexp-macro-assembler-ia32.cc » ('j') | src/jsregexp.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698