Uploaded new patch set.

http://codereview.chromium.org/7553012/diff/1/src/heap.h
File src/heap.h (right):

http://codereview.chromium.org/7553012/diff/1/src/heap.h#newcode135
src/heap.h:135: V(Object, encountered_weak_maps, EncounteredWeakMaps)
                    \
On 2011/08/02 16:32:00, Vyacheslav Egorov wrote:
Do we really need a separate root for this list?

I think just a field on the Heap or MarkCompactCollector should be
enough.

Done. I made it into a root to have the list available for shrinking of
tables after the GC (including a possible compaction) finished. But we
do not yet shrink anyways, so no need for it to be a root.

http://codereview.chromium.org/7553012/diff/1/src/mark-compact.cc
File src/mark-compact.cc (right):

http://codereview.chromium.org/7553012/diff/1/src/mark-compact.cc#newcode588
src/mark-compact.cc:588:
heap->mark_compact_collector()->SetMark(weak_map->unchecked_table());
On 2011/08/02 16:32:00, Vyacheslav Egorov wrote:
What about marking unchecked_table()->map() or at least asserting that
it is
already marked (it is a root I presume)

Done.

http://codereview.chromium.org/7553012/diff/1/src/mark-compact.cc#newcode1786
src/mark-compact.cc:1786:
StaticMarkingVisitor::MarkObjectByPointer(heap(), &value);
On 2011/08/02 16:32:00, Vyacheslav Egorov wrote:
MarkObjectByPointer might modify the value (short circuiting of
cons-strings) so
you might want to store it back into table is value was modified.

Done.

http://codereview.chromium.org/7553012/diff/1/test/cctest/test-weakmaps.cc
File test/cctest/test-weakmaps.cc (right):

http://codereview.chromium.org/7553012/diff/1/test/cctest/test-weakmaps.cc#newcode108
test/cctest/test-weakmaps.cc:108: HEAP->CollectAllGarbage(false);
On 2011/08/02 16:32:00, Vyacheslav Egorov wrote:
You can add a check that key is still in the map after first GC.

Done.

http://codereview.chromium.org/7553012/diff/1/test/cctest/test-weakmaps.cc#newcode146
test/cctest/test-weakmaps.cc:146: //CHECK_EQ(32,
weakmap->table()->Capacity());
On 2011/08/02 16:32:00, Vyacheslav Egorov wrote:
Instead of leaving commented code (which we do not allow) disable test
via
expectations in cctest.status file.

Done.

http://codereview.chromium.org/7553012/

--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to