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

Issue 11228: * No failures on our own tests.... (Closed)

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

Description

* No failures on our own tests. * 26 failures on Mozilla tests. * Remember to include linebreaks in \s * Interpreter takes flat 16 bit strings as input. * Remove dubious test from mjsunit/regexp.js (http://code.google.com/p/v8/issues/detail?id=152) * Add debugging help (off by default) to unicode-test.js * The regexp-macro-assembler interface now has the concept of a current_character register. * Removed CheckCharacterClass from regexp-macro-assembler (too high level an operation for this level). * Introduce CheckCharacterLT and CheckCharacterGT to the macro assembler interface. * Make the re2k assembler use a growable instruction buffer to eliminate an arbitrary size limit. * Add --trace-regexp-bytecodes option to debug build. * Make RegExpNode::GoTo virtual so the backtrack node can just inline itself. * Add protected RegExpNode::Bind() that subclasses use when emitting their code. * Limit max recursion in Emit stage to avoid stack overflow. * Remember to reserve at least 2 registers for 0th capture. * Bail out to JSCRE when encountering \b, ^, $. * Fix code emission and implement guards on ChoiceNode. (Still doesn't use dispatch table). * Implement code emission for TextNode. * Remember to set up backtrack when writing capture indeces to capture registers so they can be unwound if neccessary. * DispatchTableConstructor::VisitBackreference isn't yet implemented, but we don't crash the VM. (Later we discover the regexp has backreferences and defer to jscre). * \b in a character class means backspace. Committed: http://code.google.com/p/v8/source/detail?r=790

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+422 lines, -187 lines) Patch
M src/assembler-re2k.h View 2 chunks +6 lines, -4 lines 0 comments Download
M src/assembler-re2k.cc View 3 chunks +24 lines, -13 lines 0 comments Download
M src/assembler-re2k-inl.h View 1 chunk +12 lines, -0 lines 0 comments Download
M src/bytecodes-re2k.h View 2 chunks +8 lines, -2 lines 1 comment Download
M src/interpreter-re2k.h View 1 chunk +1 line, -1 line 0 comments Download
M src/interpreter-re2k.cc View 4 chunks +33 lines, -25 lines 3 comments Download
M src/jsregexp.h View 9 chunks +13 lines, -7 lines 0 comments Download
M src/jsregexp.cc View 13 chunks +215 lines, -52 lines 0 comments Download
M src/jsregexp-inl.h View 2 chunks +6 lines, -0 lines 0 comments Download
M src/parser.cc View 1 chunk +3 lines, -0 lines 0 comments Download
M src/regexp-macro-assembler.h View 1 chunk +4 lines, -9 lines 0 comments Download
M src/regexp-macro-assembler-ia32.h View 1 chunk +3 lines, -0 lines 0 comments Download
M src/regexp-macro-assembler-ia32.cc View 1 chunk +12 lines, -2 lines 0 comments Download
M src/regexp-macro-assembler-re2k.h View 1 chunk +7 lines, -4 lines 1 comment Download
M src/regexp-macro-assembler-re2k.cc View 2 chunks +14 lines, -56 lines 0 comments Download
M test/cctest/test-regexp.cc View 6 chunks +30 lines, -11 lines 0 comments Download
M test/mjsunit/regexp.js View 1 chunk +4 lines, -1 line 0 comments Download
M test/mjsunit/unicode-test.js View 1 chunk +27 lines, -0 lines 1 comment Download

Messages

Total messages: 2 (0 generated)
Erik Corry
12 years, 1 month ago (2008-11-18 13:24:25 UTC) #1
Christian Plesner Hansen
12 years, 1 month ago (2008-11-18 14:07:41 UTC) #2
Lgtm.  Comments are mostly nitpicking.

http://codereview.chromium.org/11228/diff/1/9
File src/bytecodes-re2k.h (right):

http://codereview.chromium.org/11228/diff/1/9#newcode67
Line 67: #ifdef DEBUG
Does this have to be #ifdef DEBUG?  Unused static consts have no effect anyway
right?

http://codereview.chromium.org/11228/diff/1/13
File src/interpreter-re2k.cc (right):

http://codereview.chromium.org/11228/diff/1/13#newcode42
Line 42: # define BYTECODE(name) break;                                         
       \
I would prefer if the breaks were written explicitly everywhere.  This is too
subtle for my taste.  But feel free to disagree and not change it.

http://codereview.chromium.org/11228/diff/1/13#newcode44
Line 44: if (FLAG_trace_regexp_bytecodes) {                   \
Couldn't this be factored into a function rather than duplicated?

http://codereview.chromium.org/11228/diff/1/13#newcode169
Line 169: pc += 7;
I would suggest using constants for opcode length so the literal value occurs
exactly one place.  I've previously used the approach of packaging all the
information about a bytecode set into constants on a class so you could do
OpcodeInfo<CHECK_GT>::kLength, OpcodeInfo<CHECH_GT>::kArgCount, etc., so you
would always just use pc += OpcodeInfo<[current opcode]>::kLength.  That may be
too spacy for our use though.

http://codereview.chromium.org/11228/diff/1/19
File src/regexp-macro-assembler-re2k.h (right):

http://codereview.chromium.org/11228/diff/1/19#newcode57
Line 57: uc16 limit,
These should fit on one line.

http://codereview.chromium.org/11228/diff/1/4
File test/mjsunit/unicode-test.js (right):

http://codereview.chromium.org/11228/diff/1/4#newcode9132
Line 9132: //dump_re(re);
?

Powered by Google App Engine
This is Rietveld 408576698