Commit 8c1bd4f5 by Jason Merrill Committed by Jason Merrill

class.c: #if 0 complete_type_p.

	* class.c: #if 0 complete_type_p.
	* init.c (build_java_class_ref, build_new_1): Remove unused locals.
	* method.c (process_overload_item): Likewise.
	* typeck.c (comp_target_types): Likewise.

From-SVN: r22018
parent 0ec57017
1998-08-27 Jason Merrill <jason@yorick.cygnus.com> 1998-08-27 Jason Merrill <jason@yorick.cygnus.com>
* class.c: #if 0 complete_type_p.
* init.c (build_java_class_ref, build_new_1): Remove unused locals.
* method.c (process_overload_item): Likewise.
* typeck.c (comp_target_types): Likewise.
Stop sharing binfos for indirect virtual bases. Stop sharing binfos for indirect virtual bases.
* tree.c (propagate_binfo_offsets): Unshare vbases, too. * tree.c (propagate_binfo_offsets): Unshare vbases, too.
(layout_basetypes): Likewise. (layout_basetypes): Likewise.
......
...@@ -81,7 +81,7 @@ tree current_class_ptr, current_class_ref; ...@@ -81,7 +81,7 @@ tree current_class_ptr, current_class_ref;
tree current_class_name; /* IDENTIFIER_NODE: name of current class */ tree current_class_name; /* IDENTIFIER_NODE: name of current class */
tree current_class_type; /* _TYPE: the type of the current class */ tree current_class_type; /* _TYPE: the type of the current class */
tree previous_class_type; /* _TYPE: the previous type that was a class */ tree previous_class_type; /* _TYPE: the previous type that was a class */
tree previous_class_values; /* TREE_LIST: copy of the class_shadowed list tree previous_class_values; /* TREE_LIST: copy of the class_shadowed list
when leaving an outermost class scope. */ when leaving an outermost class scope. */
struct base_info; struct base_info;
...@@ -89,7 +89,6 @@ struct base_info; ...@@ -89,7 +89,6 @@ struct base_info;
static tree get_vfield_name PROTO((tree)); static tree get_vfield_name PROTO((tree));
static void finish_struct_anon PROTO((tree)); static void finish_struct_anon PROTO((tree));
static tree build_vbase_pointer PROTO((tree, tree)); static tree build_vbase_pointer PROTO((tree, tree));
static int complete_type_p PROTO((tree));
static tree build_vtable_entry PROTO((tree, tree)); static tree build_vtable_entry PROTO((tree, tree));
static tree get_vtable_name PROTO((tree)); static tree get_vtable_name PROTO((tree));
static tree get_derived_offset PROTO((tree, tree)); static tree get_derived_offset PROTO((tree, tree));
...@@ -176,6 +175,7 @@ build_vbase_pointer (exp, type) ...@@ -176,6 +175,7 @@ build_vbase_pointer (exp, type)
return build_component_ref (exp, get_identifier (name), NULL_TREE, 0); return build_component_ref (exp, get_identifier (name), NULL_TREE, 0);
} }
#if 0
/* Is the type of the EXPR, the complete type of the object? /* Is the type of the EXPR, the complete type of the object?
If we are going to be wrong, we must be conservative, and return 0. */ If we are going to be wrong, we must be conservative, and return 0. */
...@@ -221,6 +221,7 @@ complete_type_p (expr) ...@@ -221,6 +221,7 @@ complete_type_p (expr)
} }
return 0; return 0;
} }
#endif
/* Build multi-level access to EXPR using hierarchy path PATH. /* Build multi-level access to EXPR using hierarchy path PATH.
CODE is PLUS_EXPR if we are going with the grain, CODE is PLUS_EXPR if we are going with the grain,
......
...@@ -2157,7 +2157,6 @@ build_java_class_ref (type) ...@@ -2157,7 +2157,6 @@ build_java_class_ref (type)
{ {
tree name, class_decl; tree name, class_decl;
static tree CL_prefix = NULL_TREE; static tree CL_prefix = NULL_TREE;
static tree alloc_decl = NULL_TREE;
if (CL_prefix == NULL_TREE) if (CL_prefix == NULL_TREE)
CL_prefix = get_identifier("_CL_"); CL_prefix = get_identifier("_CL_");
if (jclass_node == NULL_TREE) if (jclass_node == NULL_TREE)
...@@ -2301,7 +2300,7 @@ build_new_1 (exp) ...@@ -2301,7 +2300,7 @@ build_new_1 (exp)
} }
else if (! placement && TYPE_FOR_JAVA (true_type)) else if (! placement && TYPE_FOR_JAVA (true_type))
{ {
tree name, class_addr, alloc_decl; tree class_addr, alloc_decl;
tree class_decl = build_java_class_ref (true_type); tree class_decl = build_java_class_ref (true_type);
tree class_size = size_in_bytes (true_type); tree class_size = size_in_bytes (true_type);
static char alloc_name[] = "_Jv_AllocObject"; static char alloc_name[] = "_Jv_AllocObject";
......
...@@ -1237,8 +1237,6 @@ process_overload_item (parmtype, extra_Gcode) ...@@ -1237,8 +1237,6 @@ process_overload_item (parmtype, extra_Gcode)
case ARRAY_TYPE: case ARRAY_TYPE:
#if PARM_CAN_BE_ARRAY_TYPE #if PARM_CAN_BE_ARRAY_TYPE
{ {
tree length;
OB_PUTC ('A'); OB_PUTC ('A');
if (TYPE_DOMAIN (parmtype) == NULL_TREE) if (TYPE_DOMAIN (parmtype) == NULL_TREE)
OB_PUTC ('_'); OB_PUTC ('_');
......
...@@ -1067,7 +1067,6 @@ comp_target_types (ttl, ttr, nptrs) ...@@ -1067,7 +1067,6 @@ comp_target_types (ttl, ttr, nptrs)
else if (TREE_CODE (ttr) == OFFSET_TYPE) else if (TREE_CODE (ttr) == OFFSET_TYPE)
{ {
int base; int base;
tree tmp;
/* Contravariance: we can assign a pointer to base member to a pointer /* Contravariance: we can assign a pointer to base member to a pointer
to derived member. Note difference from simple pointer case, where to derived member. Note difference from simple pointer case, where
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment