1999-09-17 Mark Mitchell <mark@codesourcery.com>
+ * cp-tree.h (language_function): Add x_eh_spec_try_block. Add
+ x_scope_stmt_stack. Add x_in_charge_parm.
+ (current_eh_spec_try_block): New macro.
+ (current_scope_stmt_stack): Likewise.
+ (current_in_charge_parm): Likewise.
+ * decl.c (start_function): Initialize current_in_charge_parm.
+ (finish_function): Use current_in_charge_parm rather than looking
+ up __in_chrg.
+ * search.c (expand_indirect_vtbls_init): Likewise.
+
* cp-tree.def (CLEANUP_STMT): Fix spelling in dumps.
(TRY_BLOCK): Likewise.
(HANDLER): Likewise.
tree x_current_class_ref;
tree x_last_tree;
tree x_last_expr_type;
+ tree x_eh_spec_try_block;
+ tree x_scope_stmt_stack;
+ tree x_in_charge_parm;
struct rtx_def *x_last_dtor_insn;
struct rtx_def *x_last_parm_cleanup_insn;
#define last_expr_type cp_function_chain->x_last_expr_type
+/* The TRY_BLOCK for the exception-specifiers for the current
+ function, if any. */
+
+#define current_eh_spec_try_block cp_function_chain->x_eh_spec_try_block
+
+/* The stack of SCOPE_STMTs for the current function. */
+
+#define current_scope_stmt_stack cp_function_chain->x_scope_stmt_stack
+
+/* The `__in_chrg' parameter for the current function. Only used for
+ destructors. */
+
+#define current_in_charge_parm cp_function_chain->x_in_charge_parm
+
/* Set to 0 at beginning of a function definition, set to 1 if
a return statement that specifies a return value is seen. */
= build_indirect_ref (t, NULL_PTR);
cp_function_chain->x_current_class_ptr = t;
+ if (DECL_DESTRUCTOR_P (decl1))
+ current_in_charge_parm = TREE_CHAIN (t);
+
resume_momentary (i);
if (! hack_decl_function_context (decl1))
end_temporary_allocation ();
tree binfo = TYPE_BINFO (current_class_type);
tree cond = integer_one_node;
tree exprstmt;
- tree in_charge_node = lookup_name (in_charge_identifier, 0);
tree virtual_size;
int ok_to_optimize_dtor = 0;
int empty_dtor = get_last_insn () == last_dtor_insn;
exprstmt = build_delete (current_class_type, current_class_ref, integer_zero_node,
LOOKUP_NONVIRTUAL|LOOKUP_DESTRUCTOR|LOOKUP_NORMAL, 0);
else
- exprstmt = build_delete (current_class_type, current_class_ref, in_charge_node,
+ exprstmt = build_delete (current_class_type,
+ current_class_ref,
+ current_in_charge_parm,
LOOKUP_NONVIRTUAL|LOOKUP_DESTRUCTOR|LOOKUP_NORMAL, 0);
/* If we did not assign to this, then `this' is non-zero at
{
tree vbases = nreverse (copy_list (CLASSTYPE_VBASECLASSES (current_class_type)));
expand_start_cond (build (BIT_AND_EXPR, integer_type_node,
- in_charge_node, integer_two_node), 0);
+ current_in_charge_parm,
+ integer_two_node), 0);
while (vbases)
{
if (TYPE_NEEDS_DESTRUCTOR (BINFO_TYPE (vbases)))
if (exprstmt)
{
cond = build (BIT_AND_EXPR, integer_type_node,
- in_charge_node, integer_one_node);
+ current_in_charge_parm, integer_one_node);
expand_start_cond (cond, 0);
expand_expr_stmt (exprstmt);
expand_end_cond ();