This is the mail archive of the java-discuss@sources.redhat.com 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]

Re: Marking bitmap


From: Tom Tromey [mailto:tromey@cygnus.com]
> Another would be to add dummy virtual functions to Object whose slots
> would then be abused to hold the extra info.  This is relatively ugly.

I don't know enough about the vtable slot used for g-marking.  But
the vtable slot used for the Class pointer could be combined with
that for the getClass method. Somthing like:

   OBJ -> VTABLE
   ...     ...   -> { return &X.Class; }
                    X.Class

I.e. the compiler generates a stub function (thunk).  We could also
have the stub be followed by the actually class in mmemory; if
the stub has a fixed size, then getting the class would not actually
require executing the stub, just adding an offset.  (The latter
optimization is problematical, and probably not worth it.  However,
a debugger might not be execute the stub,  so being able to add a
fixed offset might be worth for that.)

Anyway, just an idea.
-- 
	--Per Bothner
per@bothner.com   http://www.bothner.com/~per/

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