Richard Kenner [Thu, 29 Jun 1995 09:51:43 +0000 (05:51 -0400)]
(output_cbranch): When checking for a jump to the given insn's delay slot...
(output_cbranch): When checking for a jump to the given insn's delay
slot, handle the case where JUMP_LABEL for the given insn does not
point to the first label in a series of labels.
(output_bb, output_dbra, output_movb): Likewise.
Richard Kenner [Fri, 23 Jun 1995 02:42:04 +0000 (22:42 -0400)]
(build_signature_table_constructor): Use DECL_CONTEXT instead of...
(build_signature_table_constructor): Use DECL_CONTEXT instead of
DECL_CLASS_CONTEXT for calculating the vfield offset so abstract
virtual functions are handled correctly.
(build_signature_table_constructor): Store the correct delta in signature table
entries. It does not yet work for classes with virtual base classes as
implementations of signatures.
(build_signature_method_call): Add the delta to the object_ptr before
generating the function call.
(build_signature_method_call): Dereference the optr for the direct and virtual
calls.
(build_signature_table_constructor): Make the tag for default
implementations -1 instead of 2.
(build_signature_method_call): Change the generated conditional expression
correspondingly.
(build_signature_pointer_constructor): Deleted the sorry message that said we
can't handle multiple inheritance for implementations of signatures
(build_signature_method_call): Use the offset from the sigtable entry instead
of the vptr field from the signature pointer for building a virtual function
call.
(build_vptr_ref): Deleted.
(build_signature_pointer_or_reference_type): Deleted construction of the vptr
field.
(build_signature_pointer_constructor): Deleted initialization of/assignment to
the vptr field.
(build_signature_table_constructor): Convert the signature table entry fields
to their correct types.
(build_signature_table_constructor): Don't call digest_init for the fields of
a sigtable entry, it's wasted time.
(build_signature_table_constructor): Correctly set the offset and index fields
of a sigtable entry. Build the constructor the way digest_init does,
digest_init can't handle initializing an anonymous union inside a struct.
(build_signature_method_call): Use the index field instead of the delta field
to get the vtable index.
(build_signature_table_constructor): Rename code and offset to tag and delta,
respectively.
(build_signature_method_call): Ditto. Use above variables.
Richard Kenner [Fri, 23 Jun 1995 02:38:00 +0000 (22:38 -0400)]
(build_opfncall): Use DECL_CHAIN, not TREE_CHAIN for results from lookup_fnfields.
(build_opfncall): Use DECL_CHAIN, not TREE_CHAIN for results from
lookup_fnfields. Always give warning/error on bad code.
(build_overload_int): New routine. Break out functionality from
build_overload_value so we can reuse it.
(build_overload_value): Handle pointer to member functions as value parameters
for templates.
(build_overload_identifier): Since template parameters are shared
among all instantiations, we have to substitute in the real types in
TREE_TYPE (parm).
Richard Kenner [Fri, 23 Jun 1995 02:36:47 +0000 (22:36 -0400)]
(dont_allow_type_definitions): Define.
(SIGNATURE_VPTR_NAME): Deleted. We use the right vptr field in the object now
instead of in the signature pointer/ref.
(build_vptr_ref): Deleted extern declaration.
(tag_identifier, offset_identifier): Added extern decls.
(SIGTABLE_CODE_NAME): Renamed to SIGTABLE_TAG_NAME.
(SIGTABLE_PFN_NAME): Deleted, we'll use VTABLE_PFN_NAME instead.
Richard Kenner [Fri, 23 Jun 1995 02:33:59 +0000 (22:33 -0400)]
(can_convert): Also check for distance > 0.
(can_convert_arg): Ditto.
(user_harshness): Ditto.
(build_method_call): Make instance_ptr the signature pointer itself instead of
dereferencing the optr.
Richard Kenner [Fri, 23 Jun 1995 02:33:12 +0000 (22:33 -0400)]
(build_delete): If the TYPE_DOMAIN is not set, give an error instead of core dumping.
(build_delete): If the TYPE_DOMAIN is not set, give an error instead
of core dumping.
(build_vec_delete): Resolve an offset ref before we try to use it.
(member_init_ok_or_else): Don't allow initialization of an ancestor's member
from within a constructor.
Richard Kenner [Fri, 23 Jun 1995 02:32:12 +0000 (22:32 -0400)]
(instantiate_class_template): Add the new instantiation to template_classes.
(do_pending_expansions): Call instantiate_member_templates on all of
the classes in template_classes.
(coerce_template_parms): Since template parameters are shared among all
instantiations, we have to substitute in the real types in TREE_TYPE (parm).
(push_template_decls): Ditto.
(grok_template_type): Deleted as template parameters are shared among all
instantiations.
Richard Kenner [Fri, 23 Jun 1995 02:30:56 +0000 (22:30 -0400)]
(get_vbase): New routine to switch hierarchies from the CLASSTYPE_VBASECLASSES to the normal one.
(get_vbase): New routine to switch hierarchies from the CLASSTYPE_VBASECLASSES
to the normal one.
(expand_indirect_vtbls_init): Use get_vbase to figure out how we want to
convert to a vbase pointer.
Richard Kenner [Fri, 23 Jun 1995 02:28:23 +0000 (22:28 -0400)]
(finish_struct): A data member with the same name as the class doesn't suppress constructors.
(finish_struct): A data member with the same name as the class doesn't
suppress constructors.
(dont_allow_type_definitions): New variable set when types cannot be defined.
(finish_struct): Use it.
(build_vfn_ref): Deleted signature specific code, we don't call this function
anymore from build_signature_method_call.
Richard Kenner [Fri, 23 Jun 1995 02:27:13 +0000 (22:27 -0400)]
(build_conditional_expr): Use convert (boolean_type_node instead of truthvalue_conversion.
(build_conditional_expr): Use convert (boolean_type_node instead of
truthvalue_conversion.
(build_modify_expr): If the class lacks a constructor or assignment operator,
return error_mark_node.
(common_type): Use build_cplus_array_type.
(commonparms): Don't abort if simple_cst_equal returns < 0.
(build_c_cast): Don't tack on a NON_LVALUE_EXPR when casting to reference type.
(build_indirect_ref): Fix check for *&.
Richard Kenner [Fri, 23 Jun 1995 02:25:04 +0000 (22:25 -0400)]
(finish_function): Clear current_class_decl.
(start_function): If current_class_decl is a signature pointer, don't
dereference it but set C_C_D to current_class_decl.
(duplicate_decls): Complain about virtual functions redeclared to be inline.
(get_unique_name): New routine to name unnamed namespaces.
(push_namespace): Use get_unique_name for naming unnamed namespaces.
(complete_array_type): Fill in the TYPE_DOMAIN of our TYPE_MAIN_VARIANT if it
is not filled in.
(start_function): Complain about redefinition of a function even when
the pending_inline version is compiled after the other version.
(init_decl_processing): Fix number of fields for building sigtable_entry_type.
(tag_identifier, offset_identifier): New variables to hold the identifiers for
the sigtable fields tag and offset.
(init_decl_processing): Initialize these variables.
(init_decl_processing): Use these variables to build the sigtable_entry_type
structure. Rename the code and offset fields to tag and delta, respectively;
add offset and index fields. Changed types of fields from
short_integer_type_node to delta_type_node.
(lookup_name_real): Don't try to look anything up in an erroneous object.
(grokdeclarator): Always give errors on constant overflow for array indices.