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

Issue 12900: Irregexp:... (Closed)

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

Description

Irregexp: * Facility for generating a node several ways. This allows code to be generated for a node knowing where it is trying to match relative to the 'current position' and it allows code to be generated that knows where to backtrack to. Both allow dramatic reductions in the amount of popping and pushing on the stack and the number of indirect jumps. * Generate special backtracking for greedy quantifiers on constant-length atoms. This allows .* to run in constant space relative to input string size. * When we are checking a long sequence of characters or character classes in the input then we do them right to left and only the first (rightmost) needs to check for end-of-string. * Record the pattern in the profile instead of just <CompiledRegExp> * Nodes no longer contain an on_failure_ node. This was only used for lookaheads and they are now handled with a choice node instead. Committed: http://code.google.com/p/v8/source/detail?r=930

Patch Set 1 #

Patch Set 2 : '' #

Total comments: 6
Unified diffs Side-by-side diffs Delta from patch set Stats (+1223 lines, -536 lines) Patch
M src/ast.h View 1 12 chunks +14 lines, -28 lines 0 comments Download
M src/bytecodes-irregexp.h View 1 1 chunk +18 lines, -16 lines 0 comments Download
M src/interpreter-irregexp.cc View 1 2 chunks +15 lines, -0 lines 0 comments Download
M src/jsregexp.h View 1 16 chunks +179 lines, -54 lines 1 comment Download
M src/jsregexp.cc View 1 44 chunks +809 lines, -314 lines 5 comments Download
M src/jsregexp-inl.h View 1 1 chunk +0 lines, -5 lines 0 comments Download
M src/regexp-macro-assembler.h View 1 4 chunks +11 lines, -12 lines 0 comments Download
M src/regexp-macro-assembler-ia32.h View 1 4 chunks +7 lines, -8 lines 0 comments Download
M src/regexp-macro-assembler-ia32.cc View 1 8 chunks +27 lines, -14 lines 0 comments Download
M src/regexp-macro-assembler-irregexp.h View 1 4 chunks +7 lines, -6 lines 0 comments Download
M src/regexp-macro-assembler-irregexp.cc View 1 7 chunks +30 lines, -13 lines 0 comments Download
M src/regexp-macro-assembler-tracer.h View 1 3 chunks +6 lines, -6 lines 0 comments Download
M src/regexp-macro-assembler-tracer.cc View 1 5 chunks +29 lines, -18 lines 0 comments Download
M test/cctest/test-regexp.cc View 1 19 chunks +51 lines, -42 lines 0 comments Download
M test/mjsunit/regexp.js View 1 chunk +20 lines, -0 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
Erik Corry
12 years ago (2008-12-03 12:55:49 UTC) #1
Christian Plesner Hansen
I don't understand half of what is going on here. A high-level comment giving an ...
12 years ago (2008-12-03 15:10:10 UTC) #2
Christian Plesner Hansen
On second thought, can you please not submit this until we've talked about it tomorrow.
12 years ago (2008-12-03 17:26:10 UTC) #3
Christian Plesner Hansen
12 years ago (2008-12-08 08:54:18 UTC) #4
Does it lint?

http://codereview.chromium.org/12900/diff/203/216
File src/jsregexp.cc (right):

http://codereview.chromium.org/12900/diff/203/216#newcode1009
Line 1009: //   is requested for an identical GenerationVariant.
Most excellent!

http://codereview.chromium.org/12900/diff/203/216#newcode1205
Line 1205: int max_register,
Indentation off.

http://codereview.chromium.org/12900/diff/203/216#newcode1298
Line 1298: // Create a new trivial state and generate the node with that.
trivial -> empty?

http://codereview.chromium.org/12900/diff/203/216#newcode1443
Line 1443: Guard* guard,
Indentation.

http://codereview.chromium.org/12900/diff/203/216#newcode1599
Line 1599: ranges->at(0).from() == 0 &&
Maybe add an IsEverything method on CharacterRange to match the
CharacterRange::Everything() method that is used to construct most of these.

http://codereview.chromium.org/12900/diff/203/209
File src/jsregexp.h (right):

http://codereview.chromium.org/12900/diff/203/209#newcode914
Line 914: class GenerationVariant {
Not a fan of this name though I can't think of anything better.

Powered by Google App Engine
This is Rietveld 408576698