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

Issue 10443052: Fix missing write barrier in store field stub. (Closed)

Created:
8 years, 7 months ago by Michael Starzinger
Modified:
8 years, 6 months ago
CC:
v8-dev
Visibility:
Public.

Description

Fix missing write barrier in store field stub. R=vegorov@chromium.org BUG=v8:2143, v8:1465, chromium:129355 TEST=cctest/test-heap/Regress2143 Committed: https://code.google.com/p/v8/source/detail?r=11678

Patch Set 1 #

Total comments: 2

Patch Set 2 : Ported to all architectures. #

Patch Set 3 : Fixed missing write barrier in optimized code. #

Total comments: 6

Patch Set 4 : Addressed comments by Vyacheslav Egorov. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+288 lines, -44 lines) Patch
M src/arm/lithium-arm.h View 1 2 1 chunk +3 lines, -2 lines 0 comments Download
M src/arm/lithium-arm.cc View 1 2 1 chunk +17 lines, -5 lines 0 comments Download
M src/arm/lithium-codegen-arm.cc View 1 2 1 chunk +12 lines, -0 lines 0 comments Download
M src/arm/stub-cache-arm.cc View 1 1 chunk +14 lines, -4 lines 0 comments Download
M src/hydrogen-instructions.h View 1 2 1 chunk +4 lines, -0 lines 0 comments Download
M src/ia32/lithium-codegen-ia32.cc View 1 2 1 chunk +16 lines, -1 line 0 comments Download
M src/ia32/lithium-ia32.h View 1 2 1 chunk +6 lines, -2 lines 0 comments Download
M src/ia32/lithium-ia32.cc View 1 2 3 chunks +11 lines, -5 lines 0 comments Download
M src/ia32/stub-cache-ia32.cc View 1 chunk +13 lines, -4 lines 0 comments Download
M src/mips/lithium-codegen-mips.cc View 1 2 1 chunk +12 lines, -0 lines 0 comments Download
M src/mips/lithium-mips.h View 1 2 1 chunk +3 lines, -2 lines 0 comments Download
M src/mips/lithium-mips.cc View 1 2 1 chunk +17 lines, -5 lines 0 comments Download
M src/mips/stub-cache-mips.cc View 1 1 chunk +14 lines, -4 lines 0 comments Download
M src/x64/lithium-codegen-x64.cc View 1 2 3 1 chunk +16 lines, -1 line 0 comments Download
M src/x64/lithium-x64.cc View 1 2 3 2 chunks +15 lines, -6 lines 0 comments Download
M src/x64/stub-cache-x64.cc View 1 1 chunk +13 lines, -3 lines 0 comments Download
M test/cctest/test-heap.cc View 1 2 1 chunk +102 lines, -0 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
Vyacheslav Egorov (Google)
LGTM with comments addressed https://chromiumcodereview.appspot.com/10443052/diff/1/src/ia32/stub-cache-ia32.cc File src/ia32/stub-cache-ia32.cc (left): https://chromiumcodereview.appspot.com/10443052/diff/1/src/ia32/stub-cache-ia32.cc#oldcode787 src/ia32/stub-cache-ia32.cc:787: __ mov(FieldOperand(receiver_reg, HeapObject::kMapOffset), All architectures ...
8 years, 6 months ago (2012-05-28 10:15:27 UTC) #1
Michael Starzinger
PTAL. https://chromiumcodereview.appspot.com/10443052/diff/1/src/ia32/stub-cache-ia32.cc File src/ia32/stub-cache-ia32.cc (left): https://chromiumcodereview.appspot.com/10443052/diff/1/src/ia32/stub-cache-ia32.cc#oldcode787 src/ia32/stub-cache-ia32.cc:787: __ mov(FieldOperand(receiver_reg, HeapObject::kMapOffset), On 2012/05/28 10:15:27, Vyacheslav Egorov ...
8 years, 6 months ago (2012-05-29 14:42:38 UTC) #2
Vyacheslav Egorov (Google)
lgtm https://chromiumcodereview.appspot.com/10443052/diff/6001/src/arm/lithium-arm.cc File src/arm/lithium-arm.cc (right): https://chromiumcodereview.appspot.com/10443052/diff/6001/src/arm/lithium-arm.cc#newcode2115 src/arm/lithium-arm.cc:2115: : UseTempRegister(instr->object()); I don't think it has to ...
8 years, 6 months ago (2012-05-29 15:09:26 UTC) #3
Michael Starzinger
8 years, 6 months ago (2012-05-29 16:35:49 UTC) #4
Added new patch set.

https://chromiumcodereview.appspot.com/10443052/diff/6001/src/arm/lithium-arm.cc
File src/arm/lithium-arm.cc (right):

https://chromiumcodereview.appspot.com/10443052/diff/6001/src/arm/lithium-arm...
src/arm/lithium-arm.cc:2115: : UseTempRegister(instr->object());
On 2012/05/29 15:09:26, Vyacheslav Egorov (Google) wrote:
> I don't think it has to be TempRegister. WriteBarrier does not destroy object
> register anymore.

Yes it does, the third of the three write-barriers uses "object" as a scratch
register after it set the value in the properties backing store.

https://chromiumcodereview.appspot.com/10443052/diff/6001/src/x64/lithium-x64.cc
File src/x64/lithium-x64.cc (right):

https://chromiumcodereview.appspot.com/10443052/diff/6001/src/x64/lithium-x64...
src/x64/lithium-x64.cc:2046: : UseTempRegister(instr->object());
On 2012/05/29 15:09:26, Vyacheslav Egorov (Google) wrote:
> I don't think it has to be temp anymore. RecordWriteField should not clobber
it.

See response to previous comment.

https://chromiumcodereview.appspot.com/10443052/diff/6001/src/x64/lithium-x64...
src/x64/lithium-x64.cc:2059: LOperand* temp = (!instr->is_in_object() ||
needs_write_barrier ||
On 2012/05/29 15:09:26, Vyacheslav Egorov (Google) wrote:
> I wonder if we can use designated scratch kScratchRegister to minimize number
of
> allocated temps?

Done.

Powered by Google App Engine
This is Rietveld 408576698