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

Unified Diff: src/regexp-macro-assembler.h

Issue 14194: * Generate quick checks based on mask and compare for... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/jsregexp.cc ('k') | src/regexp-macro-assembler-ia32.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/regexp-macro-assembler.h
===================================================================
--- src/regexp-macro-assembler.h (revision 1004)
+++ src/regexp-macro-assembler.h (working copy)
@@ -58,7 +58,12 @@
Label* on_zero) = 0; // Where to go if the bit is 0. Fall through on 1.
// Dispatch after looking the current character up in a 2-bits-per-entry
// map. The destinations vector has up to 4 labels.
- virtual void CheckCharacter(uc16 c, Label* on_equal) = 0;
+ virtual void CheckCharacter(uint32_t c, Label* on_equal) = 0;
+ // Bitwise and the current character with the given constant and then
+ // check for a match with c.
+ virtual void CheckCharacterAfterAnd(uint32_t c,
+ uint32_t and_with,
+ Label* on_equal) = 0;
virtual void CheckCharacterGT(uc16 limit, Label* on_greater) = 0;
virtual void CheckCharacterLT(uc16 limit, Label* on_less) = 0;
// Check the current character for a match with a literal string. If we
@@ -81,17 +86,16 @@
// fail to match then goto the on_failure label. End of input always
// matches. If the label is NULL then we should pop a backtrack address off
// the stack and go to that.
- virtual void CheckNotCharacter(uc16 c, Label* on_not_equal) = 0;
- // Bitwise or the current character with the given constant and then
- // check for a match with c.
- virtual void CheckNotCharacterAfterOr(uc16 c,
- uc16 or_with,
- Label* on_not_equal) = 0;
+ virtual void CheckNotCharacter(uint32_t c, Label* on_not_equal) = 0;
+ virtual void CheckNotCharacterAfterAnd(uint32_t c,
+ uint32_t and_with,
+ Label* on_not_equal) = 0;
// Subtract a constant from the current character, then or with the given
// constant and then check for a match with c.
- virtual void CheckNotCharacterAfterMinusOr(uc16 c,
- uc16 minus_then_or_with,
- Label* on_not_equal) = 0;
+ virtual void CheckNotCharacterAfterMinusAnd(uc16 c,
+ uc16 minus,
+ uc16 and_with,
+ Label* on_not_equal) = 0;
virtual void CheckNotRegistersEqual(int reg1,
int reg2,
Label* on_not_equal) = 0;
@@ -122,8 +126,10 @@
// Backtracks instead if the label is NULL.
virtual void IfRegisterLT(int reg, int comparand, Label* if_lt) = 0;
virtual IrregexpImplementation Implementation() = 0;
- virtual void LoadCurrentCharacter(int cp_offset, Label* on_end_of_input) = 0;
- virtual void LoadCurrentCharacterUnchecked(int cp_offset) = 0;
+ virtual void LoadCurrentCharacter(int cp_offset,
+ Label* on_end_of_input,
+ bool check_bounds = true,
+ int characters = 1) = 0;
virtual void PopCurrentPosition() = 0;
virtual void PopRegister(int register_index) = 0;
virtual void PushBacktrack(Label* label) = 0;
« no previous file with comments | « src/jsregexp.cc ('k') | src/regexp-macro-assembler-ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698