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

Issue 7329049: Patch RecordWriteStub after adding it to the stub cache not during generation. (Closed)

Created:
9 years, 5 months ago by Vyacheslav Egorov (Chromium)
Modified:
9 years, 5 months ago
Reviewers:
Lasse Reichstein
CC:
v8-dev
Visibility:
Public.

Description

Patch RecordWriteStub after adding it to the stub cache not during generation. This guarantees that stub's mode will match the state of incremental marker. R=lrn@chromium.org BUG=v8:1545 Committed: http://code.google.com/p/v8/source/detail?r=8618

Patch Set 1 #

Total comments: 8
Unified diffs Side-by-side diffs Delta from patch set Stats (+41 lines, -25 lines) Patch
M src/arm/code-stubs-arm.h View 1 chunk +4 lines, -0 lines 0 comments Download
M src/code-stubs.cc View 2 chunks +11 lines, -1 line 6 comments Download
M src/ia32/code-stubs-ia32.cc View 1 chunk +4 lines, -12 lines 0 comments Download
M src/incremental-marking.h View 1 chunk +2 lines, -0 lines 0 comments Download
M src/incremental-marking.cc View 1 chunk +16 lines, -0 lines 2 comments Download
M src/x64/code-stubs-x64.cc View 1 chunk +4 lines, -12 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
Vyacheslav Egorov (Chromium)
9 years, 5 months ago (2011-07-11 18:15:55 UTC) #1
Lasse Reichstein
LGTM http://codereview.chromium.org/7329049/diff/1/src/code-stubs.cc File src/code-stubs.cc (right): http://codereview.chromium.org/7329049/diff/1/src/code-stubs.cc#newcode125 src/code-stubs.cc:125: heap->incremental_marking()->ActivateGeneratedStub(code); Seems like the wrong direction of dependency, ...
9 years, 5 months ago (2011-07-12 06:44:16 UTC) #2
Vyacheslav Egorov (Chromium)
9 years, 5 months ago (2011-07-12 11:17:11 UTC) #3
Thanks. Landing.

http://codereview.chromium.org/7329049/diff/1/src/code-stubs.cc
File src/code-stubs.cc (right):

http://codereview.chromium.org/7329049/diff/1/src/code-stubs.cc#newcode125
src/code-stubs.cc:125: heap->incremental_marking()->ActivateGeneratedStub(code);
On 2011/07/12 06:44:16, Lasse Reichstein wrote:
> Seems like the wrong direction of dependency, to make the CodeStub superclass
> know about a specific kind of subclass.
> How about calling a virtual callback function on the stub that only do
something
> if it's needed.

I did not want to introduce two virtual function for such a small thingy. (btw
MajorKey returns enum which contains all "subclasses" so CodeStub already knows
everything about it's subclasses).

Nevertheless I agree that virtual functions are slightly cleaner way of doing
this. Done.

http://codereview.chromium.org/7329049/diff/1/src/code-stubs.cc#newcode165
src/code-stubs.cc:165: } else if (MajorKey() == RecordWrite) {
On 2011/07/12 06:44:16, Lasse Reichstein wrote:
> Again, create a virtual function, e.g., MustBeCached(), that returns true on
the
> RecordWrite stub.

Done.

http://codereview.chromium.org/7329049/diff/1/src/code-stubs.cc#newcode172
src/code-stubs.cc:172: heap->incremental_marking()->ActivateGeneratedStub(code);
On 2011/07/12 06:44:16, Lasse Reichstein wrote:
> And again.

Done.

http://codereview.chromium.org/7329049/diff/1/src/incremental-marking.cc
File src/incremental-marking.cc (right):

http://codereview.chromium.org/7329049/diff/1/src/incremental-marking.cc#newc...
src/incremental-marking.cc:310: RecordWriteStub::STORE_BUFFER_ONLY);
On 2011/07/12 06:44:16, Lasse Reichstein wrote:
> Indent to '(' or four chars from start of statement, not four chars from '('.

Done.

Powered by Google App Engine
This is Rietveld 408576698