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

Issue 17416: * Move irregexp backtrack stack to external memory area, instead of the system stack. (Closed)

Created:
11 years, 11 months ago by Lasse Reichstein
Modified:
9 years, 6 months ago
Reviewers:
Erik Corry
CC:
v8-dev
Visibility:
Public.

Description

Separately growing stack for irregexp ia32 backtrack stack.

Patch Set 1 #

Patch Set 2 : Now with all files #

Patch Set 3 : Lint fix #

Total comments: 24

Patch Set 4 : Addressed review comments #

Total comments: 17

Patch Set 5 : Added explicit stack check requests to push operations. #

Total comments: 20
Unified diffs Side-by-side diffs Delta from patch set Stats (+835 lines, -327 lines) Patch
M src/SConscript View 1 2 1 chunk +5 lines, -5 lines 0 comments Download
M src/assembler.h View 1 chunk +3 lines, -0 lines 0 comments Download
M src/assembler.cc View 2 chunks +6 lines, -0 lines 0 comments Download
M src/jsregexp.cc View 1 2 3 4 8 chunks +20 lines, -8 lines 8 comments Download
M src/regexp-macro-assembler.h View 1 2 3 4 3 chunks +17 lines, -5 lines 2 comments Download
M src/regexp-macro-assembler.cc View 1 2 3 4 1 chunk +2 lines, -1 line 0 comments Download
M src/regexp-macro-assembler-ia32.h View 1 2 3 4 9 chunks +64 lines, -32 lines 0 comments Download
M src/regexp-macro-assembler-ia32.cc View 1 2 3 4 33 chunks +333 lines, -167 lines 8 comments Download
M src/regexp-macro-assembler-irregexp.h View 1 chunk +6 lines, -3 lines 0 comments Download
M src/regexp-macro-assembler-irregexp.cc View 3 chunks +8 lines, -3 lines 0 comments Download
M src/regexp-macro-assembler-tracer.h View 2 chunks +5 lines, -3 lines 0 comments Download
M src/regexp-macro-assembler-tracer.cc View 3 chunks +19 lines, -9 lines 0 comments Download
A src/regexp-stack.h View 2 3 4 1 chunk +108 lines, -0 lines 2 comments Download
A src/regexp-stack.cc View 2 3 4 1 chunk +94 lines, -0 lines 0 comments Download
M src/v8threads.cc View 4 chunks +5 lines, -1 line 0 comments Download
M test/cctest/test-regexp.cc View 1 2 3 4 18 chunks +124 lines, -90 lines 0 comments Download
M tools/visual_studio/v8_base.vcproj View 2 chunks +8 lines, -0 lines 0 comments Download
M tools/visual_studio/v8_base_arm.vcproj View 2 chunks +8 lines, -0 lines 0 comments Download

Messages

Total messages: 8 (0 generated)
Lasse Reichstein
The approach of moving the backtrack stack to another memory area was easier than expected. ...
11 years, 11 months ago (2009-01-08 14:09:33 UTC) #1
iposva
I have not looked in detail at the register reshuffling due to the use of ...
11 years, 11 months ago (2009-01-09 05:44:13 UTC) #2
Lasse Reichstein
Addressed review comments http://codereview.chromium.org/17416/diff/28/232 File src/regexp-macro-assembler-ia32.cc (right): http://codereview.chromium.org/17416/diff/28/232#newcode627 Line 627: __ mov(ecx, Operand(ebp, kStackHighEnd)); On ...
11 years, 11 months ago (2009-01-09 09:59:04 UTC) #3
Erik Corry
LGTM http://codereview.chromium.org/17416/diff/245/250 File src/regexp-macro-assembler-ia32.cc (right): http://codereview.chromium.org/17416/diff/245/250#newcode244 Line 244: #ifdef DEBUG This will not do. We ...
11 years, 11 months ago (2009-01-09 10:34:58 UTC) #4
iposva
LGTM. http://codereview.chromium.org/17416/diff/245/250 File src/regexp-macro-assembler-ia32.cc (right): http://codereview.chromium.org/17416/diff/245/250#newcode695 Line 695: // stack limit being hit and an ...
11 years, 11 months ago (2009-01-10 07:31:38 UTC) #5
Lasse Reichstein
Erik: As discussed, added explicit request for check of the backtrack stack limit to Push ...
11 years, 11 months ago (2009-01-12 10:34:12 UTC) #6
Erik Corry
LGTM http://codereview.chromium.org/17416/diff/262/404 File src/jsregexp.cc (right): http://codereview.chromium.org/17416/diff/262/404#newcode1353 Line 1353: int push_limit = (assembler->stack_limit() + 1) / ...
11 years, 11 months ago (2009-01-12 11:50:12 UTC) #7
Lasse Reichstein
11 years, 11 months ago (2009-01-12 13:03:59 UTC) #8
Addressed review comments.

http://codereview.chromium.org/17416/diff/245/250
File src/regexp-macro-assembler-ia32.cc (right):

http://codereview.chromium.org/17416/diff/245/250#newcode695
Line 695: // stack limit being hit and an exception have already been raised.
On 2009/01/10 07:31:39, iposva wrote:
> "an exception has already"

Done.

http://codereview.chromium.org/17416/diff/262/404
File src/jsregexp.cc (right):

http://codereview.chromium.org/17416/diff/262/404#newcode1353
Line 1353: int push_limit = (assembler->stack_limit() + 1) / 2;
Rounding up in case the value is one (which it happens to be for
macro-assembler-irregexp).
Comment added.

http://codereview.chromium.org/17416/diff/262/404#newcode1471
Line 1471:
assembler->PushCurrentPosition(RegExpMacroAssembler::kNoStackLimitCheck);
What's wrong with needless generality now?!?
Ok, removed.

http://codereview.chromium.org/17416/diff/262/404#newcode1479
Line 1479: assembler->PushBacktrack(&undo,
RegExpMacroAssembler::kCheckStackLimit);
Removed too

http://codereview.chromium.org/17416/diff/262/404#newcode2813
Line 2813: RegExpMacroAssembler::kCheckStackLimit);
PushCurrentPosition never checks now. 
We shouldn't need more than one of those between other types of pushes anyway.

http://codereview.chromium.org/17416/diff/262/405
File src/regexp-macro-assembler-ia32.cc (right):

http://codereview.chromium.org/17416/diff/262/405#newcode680
Line 680: i < num_registers_; i += kRegistersPerPage) {
On 2009/01/12 11:50:13, Erik Corry wrote:
> for(...;...;...) should be either all on one line or on 3 lines.

Done.

http://codereview.chromium.org/17416/diff/262/405#newcode681
Line 681: __ mov(register_location(i), eax);  // One write every page.
On 2009/01/12 11:50:13, Erik Corry wrote:
> Please add a test that executes this line if there isn't one already.

Done.

http://codereview.chromium.org/17416/diff/262/405#newcode876
Line 876: if (check_stack_limit) CheckStackLimit();
Better safe and safe than sorry and sorry.
Fixed.

http://codereview.chromium.org/17416/diff/262/412
File src/regexp-macro-assembler.h (right):

http://codereview.chromium.org/17416/diff/262/412#newcode57
Line 57: // often is allowed (and encouraged)
On 2009/01/12 11:50:13, Erik Corry wrote:
> Missing full stop, and I see no need to encourage inefficiency.  Also the
name
> is not descriptive.  Something including the word 'slack' seems more
> appropriate.

Done.

http://codereview.chromium.org/17416/diff/262/414
File src/regexp-stack.h (right):

http://codereview.chromium.org/17416/diff/262/414#newcode64
Line 64: return &(thread_local_.limit_);
On 2009/01/12 11:50:13, Erik Corry wrote:
> This looks like it would all fit on one line.

Done.

Powered by Google App Engine
This is Rietveld 408576698