This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Java: new field in class Class
Add a field to class Class in order to support Java stack unwinding.
For an extendsive discussion about this, see the thread at
http://gcc.gnu.org/ml/java/2002-11/msg00438.html,
Andrew.
2002-12-03 Andrew Haley <aph@redhat.com>
* class.c (make_class_data): New field, "chain".
* decl.c (java_init_decl_processing): Likewise.
Index: class.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/class.c,v
retrieving revision 1.138
diff -c -p -r1.138 class.c
*** class.c 18 Nov 2002 15:46:31 -0000 1.138
--- class.c 3 Dec 2002 13:28:05 -0000
*************** make_class_data (type)
*** 1665,1670 ****
--- 1665,1671 ----
PUSH_FIELD_VALUE (cons, "idt", null_pointer_node);
PUSH_FIELD_VALUE (cons, "arrayclass", null_pointer_node);
PUSH_FIELD_VALUE (cons, "protectionDomain", null_pointer_node);
+ PUSH_FIELD_VALUE (cons, "chain", null_pointer_node);
FINISH_RECORD_CONSTRUCTOR (cons);
Index: decl.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/decl.c,v
retrieving revision 1.138
diff -c -p -r1.138 decl.c
*** decl.c 28 Nov 2002 02:12:01 -0000 1.138
--- decl.c 3 Dec 2002 13:28:06 -0000
*************** java_init_decl_processing ()
*** 708,713 ****
--- 708,714 ----
PUSH_FIELD (class_type_node, field, "idt", ptr_type_node);
PUSH_FIELD (class_type_node, field, "arrayclass", ptr_type_node);
PUSH_FIELD (class_type_node, field, "protectionDomain", ptr_type_node);
+ PUSH_FIELD (class_type_node, field, "chain", ptr_type_node);
for (t = TYPE_FIELDS (class_type_node); t != NULL_TREE; t = TREE_CHAIN (t))
FIELD_PRIVATE (t) = 1;
push_super_field (class_type_node, object_type_node);