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

Issue 10830: * We want to be able to find atoms and character classes without advancing th... (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

* We want to be able to find atoms and character classes without advancing the current position. * Change the way we handle hitting the end of string. Now we jump to a label if we hit it, instead of loading a magic value into the current character register. * Use handles in match function. * Macro assembler interface is now much closer to what we expect to need. * Some implementation of the regexp macro assembler with the bytecode back end. * Some tests for regexp macro assembler. * Start code on nodes to emit code. Non-complete, non-tested. Committed: http://code.google.com/p/v8/source/detail?r=741

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+770 lines, -234 lines) Patch
M src/assembler-re2k.h View 3 chunks +35 lines, -23 lines 0 comments Download
M src/assembler-re2k.cc View 6 chunks +67 lines, -34 lines 0 comments Download
M src/bytecodes-re2k.h View 1 chunk +14 lines, -14 lines 0 comments Download
M src/interpreter-re2k.h View 1 chunk +2 lines, -2 lines 0 comments Download
M src/interpreter-re2k.cc View 8 chunks +66 lines, -44 lines 0 comments Download
M src/jsregexp.h View 3 chunks +18 lines, -2 lines 0 comments Download
M src/jsregexp.cc View 22 chunks +136 lines, -32 lines 0 comments Download
M src/regexp-macro-assembler.h View 1 chunk +73 lines, -63 lines 4 comments Download
M src/regexp-macro-assembler-re2k.h View 1 chunk +52 lines, -0 lines 0 comments Download
M src/regexp-macro-assembler-re2k.cc View 1 chunk +223 lines, -0 lines 0 comments Download
M test/cctest/test-regexp.cc View 7 chunks +84 lines, -20 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
Erik Corry
12 years, 1 month ago (2008-11-12 13:08:53 UTC) #1
Lasse Reichstein
LGTM http://codereview.chromium.org/10830/diff/1/4 File src/regexp-macro-assembler.h (right): http://codereview.chromium.org/10830/diff/1/4#newcode45 Line 45: virtual void EmitOrLink(Label* label) = 0; What ...
12 years, 1 month ago (2008-11-12 14:07:22 UTC) #2
Erik Corry
12 years, 1 month ago (2008-11-12 14:14:33 UTC) #3
http://codereview.chromium.org/10830/diff/1/4
File src/regexp-macro-assembler.h (right):

http://codereview.chromium.org/10830/diff/1/4#newcode45
Line 45: virtual void EmitOrLink(Label* label) = 0;
On 2008/11/12 14:07:23, lrn wrote:
> What does this do? Shouldn't this be in the underlying assembler, if the macro
> assembler need it?
> (I.e., which generic algorithm, based on the interface of the macro assembler,
> will need to emit a raw label? Or emit anything directly?)

The switch code for Choice nodes needs to emit a table of destinations for the
table.  The destination nodes have not necessarily been code generated yet, but
we can get their labels and use this function to fill in the table.

http://codereview.chromium.org/10830/diff/1/4#newcode72
Line 72: Vector<const uc16> str,
On 2008/11/12 14:07:23, lrn wrote:
> This sends a raw vector as argument. Are we certain this will work if the
called
> function triggers a GC?

I think the data that we are using as input is not going to be in the JS heap.

Powered by Google App Engine
This is Rietveld 408576698