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

Issue 18193: Add support for \b and ^ and $ in multiline mode, completing Irregexp... (Closed)

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

Description

Add support for \b and ^ and $ in multiline mode, completing Irregexp features. Switch on Irregexp by default. Committed: http://code.google.com/p/v8/source/detail?r=1104

Patch Set 1 #

Total comments: 10
Unified diffs Side-by-side diffs Delta from patch set Stats (+312 lines, -205 lines) Patch
M src/bytecodes-irregexp.h View 1 chunk +3 lines, -2 lines 0 comments Download
M src/flag-definitions.h View 1 chunk +4 lines, -5 lines 1 comment Download
M src/interpreter-irregexp.cc View 1 chunk +7 lines, -0 lines 0 comments Download
M src/jsregexp.h View 8 chunks +43 lines, -15 lines 0 comments Download
M src/jsregexp.cc View 19 chunks +216 lines, -139 lines 8 comments Download
M src/regexp-macro-assembler.h View 1 chunk +1 line, -0 lines 0 comments Download
M src/regexp-macro-assembler-ia32.h View 1 chunk +1 line, -0 lines 0 comments Download
M src/regexp-macro-assembler-ia32.cc View 1 chunk +14 lines, -0 lines 0 comments Download
M src/regexp-macro-assembler-irregexp.h View 1 chunk +1 line, -0 lines 0 comments Download
M src/regexp-macro-assembler-irregexp.cc View 1 chunk +6 lines, -0 lines 0 comments Download
M src/regexp-macro-assembler-tracer.h View 1 chunk +1 line, -0 lines 0 comments Download
M src/regexp-macro-assembler-tracer.cc View 1 chunk +6 lines, -0 lines 0 comments Download
M src/string.js View 1 chunk +3 lines, -0 lines 0 comments Download
M test/mozilla/mozilla.status View 5 chunks +6 lines, -44 lines 1 comment Download

Messages

Total messages: 2 (0 generated)
Erik Corry
11 years, 11 months ago (2009-01-19 09:57:06 UTC) #1
Christian Plesner Hansen
11 years, 11 months ago (2009-01-19 10:28:59 UTC) #2
Sticks the value!

http://codereview.chromium.org/18193/diff/1/6
File src/flag-definitions.h (right):

http://codereview.chromium.org/18193/diff/1/6#newcode202
Line 202: // Irregexp
What about the failing layout tests?

http://codereview.chromium.org/18193/diff/1/14
File src/jsregexp.cc (left):

http://codereview.chromium.org/18193/diff/1/14#oldcode4099
Line 4099: RegExpNode* ActionNode::PropagateForward(NodeInfo* info) {
O joy, we can get rid of all this cra..., I mean stuff.

http://codereview.chromium.org/18193/diff/1/14
File src/jsregexp.cc (right):

http://codereview.chromium.org/18193/diff/1/14#newcode2379
Line 2379: assembler->LoadCurrentCharacter(-1, new_trace.backtrack(), false);
Maybe a comment about why this works when you're at character 0?

http://codereview.chromium.org/18193/diff/1/14#newcode2391
Line 2391: Label before_non_word;
Maybe you could split these huge cases out into separate functions, that way you
could just pass different arguments for the boundary and non-boundary cases.

http://codereview.chromium.org/18193/diff/1/14#newcode2419
Line 2419: assembler->LoadCurrentCharacter(new_trace.cp_offset() - 1,
What happens here if we're right at the beginning of the input?

http://codereview.chromium.org/18193/diff/1/14#newcode2655
Line 2655: // We can call this with by == 0.  In that case it just means that
the
Maybe split invalidation out into a separate method?  I was really confused by
the AdvanceCurrentPositionInTrace(0, ...) in EmitWordCheck.

http://codereview.chromium.org/18193/diff/1/14#newcode3865
Line 3865: new RegExpCharacterClass(newline_ranges, false);
You should be able to just use "new RegExpCharacterClass('n')".

http://codereview.chromium.org/18193/diff/1/14#newcode3868
Line 3868: TextNode* newline_matcher = new TextNode(
You should be able to use "new TextNode(newline_atom, ...)".

http://codereview.chromium.org/18193/diff/1/14#newcode3885
Line 3885: UNREACHABLE();
Maybe have this in the 'default' case, that way the compiler will complain if we
forget the return in one of the other cases.

http://codereview.chromium.org/18193/diff/1/2
File test/mozilla/mozilla.status (left):

http://codereview.chromium.org/18193/diff/1/2#oldcode231
Line 231: 
I wouldn't enable us by default yet, and so I wouldn't reenable these tests
either.

Powered by Google App Engine
This is Rietveld 408576698