This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: FYI: Linker & Verifier fixes (really GC mark procedures)


Andrew Haley wrote:
 > The code in _Jv_MarkObj that directly traces objects referenced from
 > class objects (instead of pushing them on the mark stack) is on very
 > thin ice.  That's not how mark procedures are supposed to work.  In my
 > opinion, if we could make it go away, that would be great.

Indeed. I have a patch in the pipeline that causes all objects of
class Class to be properly allocated rather than statically allocated
by the linker. In turn, this has the potential to make _Jv_MarkObj
eventually go away.

Yes, _Jv_MarkObj has long been a source of bugs - it would be a big improvement to get rid of it.


Once we have this new class metadata scheme, the layout of jclass will no longer dictated by the compiler/ABI. It should be trivial to arrange jclass so that (eg) all the pointers that need to be marked are at the beginning of the object, and give it a length-based mark descriptor so that we maintain precise scanning.

Since we'll be allocating variable-length storage for each class's static fields at runtime, this would be split into one block for pointers, and another block for non-pointer data.

Bryce


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]