OSDN Git Service

Fix the jweak implementation.
authorElliott Hughes <enh@google.com>
Mon, 11 Jul 2011 23:44:34 +0000 (16:44 -0700)
committerElliott Hughes <enh@google.com>
Tue, 12 Jul 2011 01:25:39 +0000 (18:25 -0700)
commit259a8a5154c63a793ea0ee438d146acda7d990b6
treea5fb236ebb92b24b1c1784ed7d88a05a8b8d0fae
parentea333384b92db9c400be1b4c8cb6992d9ba5f14d
Fix the jweak implementation.

We need to distinguish between "cleared weak global" and "deleted weak global".
Previously we used NULL for both. Now we add a magic value for cleared weak
globals. I've also switched the GC over to using iterators, so IndirectRefTable
itself becomes responsible for not showing bad pointers to the GC.

I've also improved the reference table dumping to cope with the new scheme and
to be a bit easier to read (through extra indentation).

Bug: 4260055
Change-Id: I26af301fb2b46d014c6f6b0915a8f8a7fb6d7c5b
vm/CheckJni.cpp
vm/IndirectRefTable.cpp
vm/IndirectRefTable.h
vm/Jni.cpp
vm/ReferenceTable.cpp
vm/alloc/MarkSweep.cpp
vm/alloc/Visit.cpp