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

Issue 9854020: RegExp: Add support for table-based character class (Closed)

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

Description

RegExp: Add support for table-based character class code generation. This is performance neutral for all our tests, but a factor 6 faster for the Unicode based regexp in the new test (and much more compact code). Committed: https://code.google.com/p/v8/source/detail?r=11189

Patch Set 1 #

Patch Set 2 : #

Total comments: 56

Patch Set 3 : #

Total comments: 9

Patch Set 4 : #

Total comments: 8
Unified diffs Side-by-side diffs Delta from patch set Stats (+10605 lines, -152 lines) Patch
M src/arm/regexp-macro-assembler-arm.h View 1 chunk +8 lines, -0 lines 0 comments Download
M src/arm/regexp-macro-assembler-arm.cc View 1 2 1 chunk +38 lines, -0 lines 0 comments Download
M src/bytecodes-irregexp.h View 1 chunk +17 lines, -18 lines 0 comments Download
M src/ia32/regexp-macro-assembler-ia32.h View 1 chunk +8 lines, -0 lines 0 comments Download
M src/ia32/regexp-macro-assembler-ia32.cc View 1 2 3 chunks +55 lines, -8 lines 0 comments Download
M src/interpreter-irregexp.cc View 1 2 3 chunks +33 lines, -54 lines 0 comments Download
M src/jsregexp.cc View 1 2 3 6 chunks +394 lines, -59 lines 4 comments Download
M src/mips/regexp-macro-assembler-mips.h View 1 chunk +8 lines, -0 lines 2 comments Download
M src/regexp-macro-assembler.h View 1 2 2 chunks +17 lines, -1 line 0 comments Download
M src/regexp-macro-assembler-irregexp.h View 2 chunks +8 lines, -0 lines 0 comments Download
M src/regexp-macro-assembler-irregexp.cc View 1 2 1 chunk +36 lines, -0 lines 0 comments Download
M src/regexp-macro-assembler-irregexp-inl.h View 1 2 1 chunk +10 lines, -0 lines 0 comments Download
M src/regexp-macro-assembler-tracer.h View 1 chunk +7 lines, -0 lines 0 comments Download
M src/regexp-macro-assembler-tracer.cc View 7 chunks +97 lines, -12 lines 0 comments Download
M src/x64/regexp-macro-assembler-x64.h View 1 chunk +8 lines, -0 lines 0 comments Download
M src/x64/regexp-macro-assembler-x64.cc View 1 2 3 1 chunk +36 lines, -0 lines 0 comments Download
A test/mjsunit/unicodelctest.js View 1 2 3 1 chunk +4912 lines, -0 lines 0 comments Download
A test/mjsunit/unicodelctest-no-optimization.js View 1 2 3 1 chunk +4913 lines, -0 lines 2 comments Download

Messages

Total messages: 10 (0 generated)
Erik Corry
8 years, 9 months ago (2012-03-26 11:12:35 UTC) #1
ulan
First round of comments. http://codereview.chromium.org/9854020/diff/6001/src/interpreter-irregexp.cc File src/interpreter-irregexp.cc (right): http://codereview.chromium.org/9854020/diff/6001/src/interpreter-irregexp.cc#newcode475 src/interpreter-irregexp.cc:475: byte b = pc[8 + ...
8 years, 9 months ago (2012-03-27 11:02:43 UTC) #2
Erik Corry
New version uploaded that fixes comments and slightly optimizes CheckBitInTable on IA32, x64 and ARM. ...
8 years, 9 months ago (2012-03-28 09:40:26 UTC) #3
ulan
Second round of comments, it is close to looking good. http://codereview.chromium.org/9854020/diff/6001/src/jsregexp.cc File src/jsregexp.cc (right): http://codereview.chromium.org/9854020/diff/6001/src/jsregexp.cc#newcode1555 ...
8 years, 9 months ago (2012-03-28 13:14:08 UTC) #4
Lasse Reichstein Nielsen
DBC. Like change! https://chromiumcodereview.appspot.com/9854020/diff/11001/src/x64/regexp-macro-assembler-x64.cc File src/x64/regexp-macro-assembler-x64.cc (right): https://chromiumcodereview.appspot.com/9854020/diff/11001/src/x64/regexp-macro-assembler-x64.cc#newcode578 src/x64/regexp-macro-assembler-x64.cc:578: Label* on_in_range) { Maybe special-case if ...
8 years, 9 months ago (2012-03-28 14:02:09 UTC) #5
Erik Corry
http://codereview.chromium.org/9854020/diff/6001/src/jsregexp.cc File src/jsregexp.cc (right): http://codereview.chromium.org/9854020/diff/6001/src/jsregexp.cc#newcode1555 src/jsregexp.cc:1555: Label* even_label, On 2012/03/28 13:14:08, ulan wrote: > Odd/even ...
8 years, 8 months ago (2012-03-29 14:48:59 UTC) #6
Lasse Reichstein
http://codereview.chromium.org/9854020/diff/11001/src/x64/regexp-macro-assembler-x64.cc File src/x64/regexp-macro-assembler-x64.cc (right): http://codereview.chromium.org/9854020/diff/11001/src/x64/regexp-macro-assembler-x64.cc#newcode602 src/x64/regexp-macro-assembler-x64.cc:602: __ and_(rbx, Immediate(kTableMask)); I don't think the register renamer ...
8 years, 8 months ago (2012-03-29 15:25:32 UTC) #7
ulan
LGTM! http://codereview.chromium.org/9854020/diff/15001/src/jsregexp.cc File src/jsregexp.cc (right): http://codereview.chromium.org/9854020/diff/15001/src/jsregexp.cc#newcode1843 src/jsregexp.cc:1843: ASSERT_LT(new_end_index, end_index); Also: start_index <= new_end_index && new_start_index ...
8 years, 8 months ago (2012-03-29 16:19:16 UTC) #8
Erik Corry
http://codereview.chromium.org/9854020/diff/11001/src/x64/regexp-macro-assembler-x64.cc File src/x64/regexp-macro-assembler-x64.cc (right): http://codereview.chromium.org/9854020/diff/11001/src/x64/regexp-macro-assembler-x64.cc#newcode602 src/x64/regexp-macro-assembler-x64.cc:602: __ and_(rbx, Immediate(kTableMask)); On 2012/03/29 15:25:32, Lasse Reichstein wrote: ...
8 years, 8 months ago (2012-03-30 07:46:28 UTC) #9
Erik Corry
8 years, 8 months ago (2012-03-31 20:04:04 UTC) #10
https://chromiumcodereview.appspot.com/9854020/diff/11001/src/x64/regexp-macr...
File src/x64/regexp-macro-assembler-x64.cc (right):

https://chromiumcodereview.appspot.com/9854020/diff/11001/src/x64/regexp-macr...
src/x64/regexp-macro-assembler-x64.cc:602: __ and_(rbx, Immediate(kTableMask));
On 2012/03/30 07:46:28, Erik Corry wrote:
> On 2012/03/29 15:25:32, Lasse Reichstein wrote:
> > I don't think the register renamer will do that since the value of
> > current_character() needs to be retained as well. A move will use a
different
> > physical register.
> 
> My understanding is that after renaming you have gone from 2-register
> instructions to 3-register instructions so the mov disappears.

But I tested it and your version is marginally faster.

Powered by Google App Engine
This is Rietveld 408576698