Marking bitmap
Per Bothner
per@bothner.com
Fri Dec 1 11:12:00 GMT 2000
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/
More information about the Java
mailing list