PATCH: more field renames

Tom Tromey tromey@cygnus.com
Fri Oct 30 01:45:00 GMT 1998


I'm committing the appended patch to the java front end.  It renames a
couple fields in the Class class; in the last renaming I missed a
field and ended up inadvertantly giving another field a confusing
name.  This patch also changes the compiler to always set the `state'
field to 0; the old values don't have meaning any more.

1998-10-30  Tom Tromey  <tromey@cygnus.com>

	* class.c (make_class_data): Renamed fields: nmethods to
	method_count, method_count to dtable_method_count.  Always set
	`state' field to 0.
	* decl.c (init_decl_processing): Likewise.

Tom

Index: class.c
===================================================================
RCS file: /cvs/egcs/egcs/gcc/java/class.c,v
retrieving revision 1.8
diff -u -r1.8 class.c
--- class.c	1998/10/28 13:06:05	1.8
+++ class.c	1998/10/30 08:07:50
@@ -1089,8 +1089,8 @@
   PUSH_FIELD_VALUE (cons, "constants", constant_pool_constructor);
   PUSH_FIELD_VALUE (cons, "methods",
 		    build1 (ADDR_EXPR, method_ptr_type_node, methods_decl));
-  PUSH_FIELD_VALUE (cons, "nmethods",  build_int_2 (method_count, 0));
-  PUSH_FIELD_VALUE (cons, "method_count", TYPE_NVIRTUALS (type));
+  PUSH_FIELD_VALUE (cons, "method_count",  build_int_2 (method_count, 0));
+  PUSH_FIELD_VALUE (cons, "dtable_method_count", TYPE_NVIRTUALS (type));
   PUSH_FIELD_VALUE (cons, "fields",
 		    fields_decl == NULL_TREE ? null_pointer_node
 		    : build1 (ADDR_EXPR, field_ptr_type_node, fields_decl));
@@ -1105,9 +1105,7 @@
   PUSH_FIELD_VALUE (cons, "interfaces", interfaces);
   PUSH_FIELD_VALUE (cons, "loader", null_pointer_node);
   PUSH_FIELD_VALUE (cons, "interface_count", build_int_2 (interface_len, 0));
-  PUSH_FIELD_VALUE (cons, "state",
-		    flag_assume_compiled ? integer_four_node
-		    : integer_two_node);
+  PUSH_FIELD_VALUE (cons, "state", integer_zero_node);
 
   PUSH_FIELD_VALUE (cons, "thread", null_pointer_node);
 
Index: decl.c
===================================================================
RCS file: /cvs/egcs/egcs/gcc/java/decl.c,v
retrieving revision 1.8
diff -u -r1.8 decl.c
--- decl.c	1998/10/28 13:06:06	1.8
+++ decl.c	1998/10/30 08:08:02
@@ -589,8 +589,8 @@
   PUSH_FIELD (class_type_node, field, "superclass", class_ptr_type);
   PUSH_FIELD (class_type_node, field, "constants", constants_type_node);
   PUSH_FIELD (class_type_node, field, "methods", method_ptr_type_node);
-  PUSH_FIELD (class_type_node, field, "nmethods", short_type_node);
   PUSH_FIELD (class_type_node, field, "method_count", short_type_node);
+  PUSH_FIELD (class_type_node, field, "dtable_method_count", short_type_node);
   PUSH_FIELD (class_type_node, field, "fields", field_ptr_type_node);
   PUSH_FIELD (class_type_node, field, "size_in_bytes", int_type_node);
   PUSH_FIELD (class_type_node, field, "field_count", short_type_node);



More information about the Gcc-patches mailing list