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

Issue 13247: * Have an ASCII and a UC16 interpreter for Irregexp bytecodes -... (Closed)

Created:
12 years ago by Erik Corry
Modified:
9 years, 7 months ago
CC:
v8-dev
Visibility:
Public.

Description

* Have an ASCII and a UC16 interpreter for Irregexp bytecodes - never have to convert an ASCII string to UC16 for Irregexp. * Generate slightly different code when we know the subject string is ASCII. Committed: http://code.google.com/p/v8/source/detail?r=941

Patch Set 1 #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+99 lines, -30 lines) Patch
M src/interpreter-irregexp.h View 1 chunk +1 line, -1 line 0 comments Download
M src/interpreter-irregexp.cc View 3 chunks +38 lines, -12 lines 0 comments Download
M src/jsregexp.cc View 14 chunks +60 lines, -17 lines 4 comments Download

Messages

Total messages: 2 (0 generated)
Erik Corry
12 years ago (2008-12-08 14:51:13 UTC) #1
Lasse Reichstein
12 years ago (2008-12-09 07:43:07 UTC) #2
http://codereview.chromium.org/13247/diff/1/4
File src/jsregexp.cc (right):

http://codereview.chromium.org/13247/diff/1/4#newcode966
Line 966: FlattenString(subject);
The string is also flattened in the IA32 branch (line 889). You could move this
outside the switch.

http://codereview.chromium.org/13247/diff/1/4#newcode1721
Line 1721: const int max_char = ascii ? 0x7f : 0xffff;
Use String::kMaxAsciiCharCode instead of 0x7f?

http://codereview.chromium.org/13247/diff/1/4#newcode1781
Line 1781: macro_assembler->CheckCharacterLT(from, &next_range);
How about a CheckCharacterRange(from, to, char_is_in_class)?
That would allow the assembler to do the unsigned-range-check-hack? "if (x -
from < to - from) ..."

http://codereview.chromium.org/13247/diff/1/4#newcode1910
Line 1910: if (quarks[j] > 0x7f) {
Use String::kMaxAsciiCharCode

Powered by Google App Engine
This is Rietveld 408576698