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

Issue 11319: * Add support for positive lookahead assertions and negative... (Closed)

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

Description

* Add support for positive lookahead assertions and negative lookahead assertions. * Fix sense of CheckChar and CheckNotChar to match CheckCharLT in bytecode assembler. Also rename them from Char to Character. * Mark unexpected pass in Mozilla tests (we can cope with 500 parentheses). * Mark unexpected hang in Mozilla tests (exponential regexp, JSCRE bails out). * Support negative character classes (yes, the parser still generates them). Committed: http://code.google.com/p/v8/source/detail?r=804

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+253 lines, -109 lines) Patch
M src/assembler-re2k.h View 2 chunks +6 lines, -3 lines 0 comments Download
M src/assembler-re2k.cc View 3 chunks +26 lines, -5 lines 2 comments Download
M src/bytecodes-re2k.h View 1 chunk +25 lines, -22 lines 0 comments Download
M src/interpreter-re2k.cc View 4 chunks +19 lines, -4 lines 0 comments Download
M src/jsregexp.h View 2 chunks +8 lines, -5 lines 0 comments Download
M src/jsregexp.cc View 11 chunks +109 lines, -51 lines 2 comments Download
M src/regexp-macro-assembler.h View 1 chunk +5 lines, -0 lines 0 comments Download
M src/regexp-macro-assembler-re2k.h View 1 chunk +5 lines, -0 lines 0 comments Download
M src/regexp-macro-assembler-re2k.cc View 3 chunks +30 lines, -6 lines 0 comments Download
M test/cctest/test-regexp.cc View 4 chunks +12 lines, -12 lines 0 comments Download
M test/mozilla/mozilla.status View 2 chunks +8 lines, -1 line 0 comments Download

Messages

Total messages: 3 (0 generated)
Erik Corry
12 years, 1 month ago (2008-11-20 09:58:09 UTC) #1
Lasse Reichstein
LGTM http://codereview.chromium.org/11319/diff/1/6 File src/assembler-re2k.cc (right): http://codereview.chromium.org/11319/diff/1/6#newcode85 Line 85: void Re2kAssembler::SetCurrentPositionFromRegister(int index) { You have "Write..To" ...
12 years, 1 month ago (2008-11-20 10:32:11 UTC) #2
Erik Corry
12 years, 1 month ago (2008-11-20 11:37:34 UTC) #3
http://codereview.chromium.org/11319/diff/1/6
File src/assembler-re2k.cc (right):

http://codereview.chromium.org/11319/diff/1/6#newcode85
Line 85: void Re2kAssembler::SetCurrentPositionFromRegister(int index) {
On 2008/11/20 10:32:11, Lasse Reichstein wrote:
> You have "Write..To" but "Set..From". Wouldn't it be more nicely symmetric if
it
> was "Read...From"?
> 

Done

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

http://codereview.chromium.org/11319/diff/1/11#newcode1701
Line 1701: int stack_pointer_register = compiler->AllocateRegister();
On 2008/11/20 10:32:11, Lasse Reichstein wrote:
> You never free a register again. 
> Would it be possible to free registers, and perhaps reuse them?

We could free them if we checked for nested expressions.  I don't think it's
worth worrying about at this stage.

Powered by Google App Engine
This is Rietveld 408576698