This is the mail archive of the java@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: Binary Compatibility: debug info for compiled Java programs


>>>>> "Daniel" == Daniel Jacobowitz <drow@false.org> writes:

>> In our BC ABI, we add a new level of indirection.  So, a field lookup
>> isn't just *(object+offset), but instead *(object+otable[index]),
>> where the otable ("offset table") is computed at class initialization
>> time.

Daniel> I still don't see how this mechanism implements the above principle,
Daniel> i.e. converting symbolic field names to offsets; is the otable
Daniel> associated with the object doing the access or with the objet defining
Daniel> the class?

The otable is associated with the class that is doing the access.
So if the implementation of class Foo refers to a method C.m(), then
the otable for Foo will have an entry "C.m" (with type signature, and
maybe some other stuff).

The symbols in the otable (and actually I've been using shorthand
here, we have a second "atable" for addresses as well -- same
difference though) are resolved when the class ("Foo") is linked.  In
Java this is done at runtime, the JVM Spec (and perhaps the JLS) has
information on the precise steps involved in class preparation and
initialization.

Tom


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