Adding fields to object_type_node

Bryce McKinlay bryce@waitaki.otago.ac.nz
Thu Oct 4 20:09:00 GMT 2001


Dachuan Yu wrote:
>Bryce McKinlay wrote:
>>>Firstly, why do you need to change object_type_node?
>>>>I wanted to change object_type_node because
>(1) I don't really understand what's going on and
>(2) "init_decl_processing"(decl.c) does a
>"PUSH_FIELD(object_type_node,...,"vtable",...)"
>and similarly class.c and expr.c do
>"PUSH_FIELD_VALUE" to some object type node
>on field "vtable", too. So I figured I better do the same
>thing... I know it's not the best reasoning... :)
>
What thats doing is making the compiler aware of the vtable pointer at
the start of every Object. Since there isn't going to be one otable per
object, but rather one per class or per compilation unit, there is no
need to have an otable pointer in every object, right?
>Anyway, I removed those codes for "object_type_node"
>(while keeping those for "class_type_node" of course),
>and added the field "otable" below the field "vtable" in
>"Class.h" with the same type.
>> _Jv_VTable *vtable;
> _Jv_VTable *otable; // My Change
>
This should work. Did you rebuild all of libgcj to account for the
change (you'll need to delete the whole build/i686-linux-gnu/libjava
directory)? If its still crashing, send me a gdb trace...
regards
Bryce.


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /