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

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

Issue 547024: RegExp bitmap test for word character. (Closed)
Patch Set: Changed to char-map. Created 10 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: src/regexp-macro-assembler.h
diff --git a/src/regexp-macro-assembler.h b/src/regexp-macro-assembler.h
index 7cc95110e39143754fac9a3c0c74e772ae1ee899..2e619bd15b9d50ec7ba791573b960098a777c06b 100644
--- a/src/regexp-macro-assembler.h
+++ b/src/regexp-macro-assembler.h
@@ -204,6 +204,15 @@ class NativeRegExpMacroAssembler: public RegExpMacroAssembler {
static const byte* StringCharacterPosition(String* subject, int start_index);
+ // Byte map of ASCII characters with a 0xff if the character is a word
+ // character (digit, letter or underscore) and 0x00 otherwise.
+ // Used by generated RegExp code.
+ static byte word_character_map[128];
+
+ static Address word_character_map_address() {
+ return &word_character_map[0];
+ }
+
static Result Execute(Code* code,
String* input,
int start_offset,

Powered by Google App Engine
This is Rietveld 408576698