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

Issue 203583007: Support weak heap references in the ConstantPool to support IsWeakObjectInOptimizedCode objects. (Closed)

Created:
6 years, 9 months ago by rmcilroy
Modified:
6 years, 9 months ago
Reviewers:
ulan
CC:
v8-dev
Visibility:
Public.

Description

Support weak heap references in the ConstantPool to support IsWeakObjectInOptimizedCode objects.

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+160 lines, -62 lines) Patch
M src/arm/assembler-arm.h View 4 chunks +5 lines, -2 lines 0 comments Download
M src/arm/assembler-arm.cc View 9 chunks +44 lines, -17 lines 0 comments Download
M src/assembler.h View 3 chunks +14 lines, -1 line 0 comments Download
M src/factory.h View 1 chunk +1 line, -0 lines 0 comments Download
M src/factory.cc View 1 chunk +4 lines, -1 line 0 comments Download
M src/heap.h View 1 chunk +1 line, -0 lines 0 comments Download
M src/heap.cc View 5 chunks +18 lines, -13 lines 0 comments Download
M src/objects.h View 7 chunks +22 lines, -20 lines 0 comments Download
M src/objects.cc View 1 chunk +4 lines, -0 lines 0 comments Download
M src/objects-inl.h View 8 chunks +32 lines, -6 lines 0 comments Download
M src/objects-printer.cc View 1 chunk +4 lines, -1 line 0 comments Download
M src/objects-visiting-inl.h View 1 chunk +8 lines, -0 lines 1 comment Download
M test/cctest/test-constantpool.cc View 1 chunk +3 lines, -1 line 0 comments Download

Messages

Total messages: 3 (0 generated)
rmcilroy
PTAL.
6 years, 9 months ago (2014-03-18 19:40:50 UTC) #1
ulan
https://codereview.chromium.org/203583007/diff/1/src/objects-visiting-inl.h File src/objects-visiting-inl.h (right): https://codereview.chromium.org/203583007/diff/1/src/objects-visiting-inl.h#newcode501 src/objects-visiting-inl.h:501: StaticVisitor::VisitPointer(heap, IIUC, each heap object pointer in constant pool ...
6 years, 9 months ago (2014-03-19 08:49:59 UTC) #2
rmcilroy
6 years, 9 months ago (2014-03-20 09:37:10 UTC) #3
On 2014/03/19 08:49:59, ulan wrote:
> https://codereview.chromium.org/203583007/diff/1/src/objects-visiting-inl.h
> File src/objects-visiting-inl.h (right):
> 
>
https://codereview.chromium.org/203583007/diff/1/src/objects-visiting-inl.h#n...
> src/objects-visiting-inl.h:501: StaticVisitor::VisitPointer(heap,
> IIUC, each heap object pointer in constant pool is also visited via reloc-info
> in
> StaticMarkingVisitor<StaticVisitor>::VisitEmbeddedPointer and
> StaticMarkingVisitor<StaticVisitor>::VisitCell.
> Those visitors already handle weak pointers.
> 
> It would be cleaner to avoid copying that logic here and in assembler-arm.
> 
> I think it is safe to only record slot for a heap pointer and not mark it
(i.e.
> replace VisitPointer with RecordSlot) since we will mark it via reloc-info
> anyway. If we do that, then there is no need to track weak pointers separately
> from heap pointers. WDYT?

Ahh yeah, this would probably work (I harbor a wish to avoid the GC having to
interpret relocinfo at all for entries in the constant pool eventually, so I was
wanting to have the ConstantPoolArray do the right thing, but we can work on
that in the future once OOL constant pool is enabled.  I will abandon this CL
and send you another one with the change you suggest.

Powered by Google App Engine
This is Rietveld 408576698