Commit a0128b67 by Mike Stump

86th Cygnus<->FSF quick merge

From-SVN: r12177
parent bb91b814
......@@ -3,6 +3,36 @@ Sat May 11 04:33:50 1996 Doug Evans <dje@canuck.cygnus.com>
* decl2.c (finish_vtable_vardecl): Surround DECL_ONE_ONLY with ifdef.
(finish_file): Likewise.
Tue Jun 4 15:41:45 1996 Jason Merrill <jason@yorick.cygnus.com>
* pt.c (tsubst_expr, case DECL_STMT): Don't pass
LOOKUP_ONLYCONVERTING at all for now.
* search.c (add_conversions): Put the conversion function in
TREE_VALUE, the basetype in TREE_PURPOSE.
* cvt.c (build_type_conversion): Adjust.
* cvt.c (build_expr_type_conversion): Adjust.
* call.c (user_harshness): Adjust.
Mon Jun 3 15:30:52 1996 Jason Merrill <jason@yorick.cygnus.com>
* method.c (emit_thunk): Pretend this is a FUNCTION_DECL for the
backend's benefit.
Fri May 31 14:56:13 1996 Mike Stump <mrs@cygnus.com>
* cp-tree.h (OFFSET_REF): Remove.
* tree.def (CP_OFFSET_REF): Rename to OFFSET_REF.
* expr.c (cplus_expand_expr): Cleanup callers of expand_expr.
* init.c (expand_aggr_init_1): Ditto.
(build_new): Ditto.
* typeck.c (expand_target_expr): Ditto.
Fri May 31 14:22:08 1996 Jason Merrill <jason@yorick.cygnus.com>
* typeck.c (build_modify_expr): Don't use TREE_VALUE on a
TARGET_EXPR.
Wed May 29 17:04:33 1996 Mike Stump <mrs@cygnus.com>
* cvt.c (build_up_reference): Redo how and when temporaries are
......
......@@ -640,18 +640,19 @@ user_harshness (type, parmtype)
for (conv = lookup_conversions (parmtype); conv; conv = TREE_CHAIN (conv))
{
struct harshness_code tmp;
tree cand = TREE_VALUE (conv);
if (winner && TREE_VALUE (winner) == TREE_VALUE (conv))
if (winner && winner == cand)
continue;
if (tmp = convert_harshness (type, TREE_PURPOSE (conv), NULL_TREE),
(tmp.code < USER_CODE) && (tmp.distance >= 0))
tmp = convert_harshness (type, TREE_TYPE (TREE_TYPE (cand)), NULL_TREE);
if ((tmp.code < USER_CODE) && (tmp.distance >= 0))
{
if (winner)
return EVIL_CODE;
else
{
winner = conv;
winner = cand;
code = tmp.code;
}
}
......
......@@ -27,7 +27,7 @@ Boston, MA 02111-1307, USA. */
Operand 0 is the object within which the offset is taken.
Operand 1 is the offset. The language independent OFFSET_REF
just won't work for us. */
DEFTREECODE (CP_OFFSET_REF, "cp_offset_ref", "r", 2)
DEFTREECODE (OFFSET_REF, "offset_ref", "r", 2)
/* For DELETE_EXPR, operand 0 is the store to be destroyed.
Operand 1 is the value to pass to the destroying function
......@@ -50,7 +50,7 @@ DEFTREECODE (MEMBER_REF, "member_ref", "r", 2)
operator converts to. Operand is expression to be converted. */
DEFTREECODE (TYPE_EXPR, "type_expr", "e", 1)
/* For CPLUS_NEW_EXPR, operand 0 is function which performs initialization,
/* For NEW_EXPR, operand 0 is function which performs initialization,
operand 1 is argument list to initialization function,
and operand 2 is the slot which was allocated for this expression. */
DEFTREECODE (NEW_EXPR, "nw_expr", "e", 3)
......
......@@ -318,10 +318,6 @@ enum cplus_tree_code {
};
#undef DEFTREECODE
/* Override OFFSET_REFs from the back-end, as we want our very own. */
/* Allow complex pointer to members to work correctly. */
#define OFFSET_REF CP_OFFSET_REF
enum languages { lang_c, lang_cplusplus };
/* Macros to make error reporting functions' lives easier. */
......
......@@ -165,7 +165,7 @@ cplus_expand_expr (exp, target, tmode, modifier)
init = maybe_build_cleanup (convert_from_reference (init));
if (init != NULL_TREE)
expand_expr (init, 0, 0, 0);
expand_expr (init, const0_rtx, VOIDmode, 0);
}
call_target = return_target = DECL_RTL (slot);
}
......
......@@ -1403,7 +1403,7 @@ expand_aggr_init_1 (binfo, true_exp, exp, init, alias_this, flags)
/* Unify the initialization targets. */
DECL_RTL (TREE_OPERAND (init, 0)) = DECL_RTL (exp);
else
DECL_RTL (TREE_OPERAND (init, 0)) = expand_expr (exp, NULL_RTX, 0, 0);
DECL_RTL (TREE_OPERAND (init, 0)) = expand_expr (exp, NULL_RTX, VOIDmode, 0);
expand_expr_stmt (init);
return;
......@@ -2965,7 +2965,7 @@ build_new (placement, decl, init, use_global_new)
do_pending_stack_adjust ();
start_sequence_for_rtl_expr (xval);
emit_note (0, -1);
rtxval = expand_expr (alloc_expr, NULL, VOIDmode, 0);
rtxval = expand_expr (alloc_expr, NULL_RTX, VOIDmode, 0);
do_pending_stack_adjust ();
TREE_SIDE_EFFECTS (xval) = 1;
RTL_EXPR_SEQUENCE (xval) = get_insns ();
......
......@@ -1750,6 +1750,8 @@ emit_thunk (thunk_fndecl)
if (current_function_decl)
abort ();
current_function_decl = thunk_fndecl;
TREE_SET_CODE (thunk_fndecl, FUNCTION_DECL);
#ifdef ASM_OUTPUT_MI_THUNK
temporary_allocation ();
assemble_start_function (thunk_fndecl, fnname);
......@@ -1937,6 +1939,7 @@ emit_thunk (thunk_fndecl)
permanent_allocation (1);
flag_omit_frame_pointer = save_ofp;
#endif /* ASM_OUTPUT_MI_THUNK */
TREE_SET_CODE (thunk_fndecl, THUNK_DECL);
decl_printable_name = save_decl_printable_name;
current_function_decl = 0;
......
......@@ -2093,7 +2093,7 @@ tsubst_expr (t, args, nargs, in_decl)
tsubst (TREE_OPERAND (t, 2), args, nargs, in_decl));
init = tsubst_expr (TREE_OPERAND (t, 3), args, nargs, in_decl);
cp_finish_decl
(dcl, init, NULL_TREE, 1, init ? LOOKUP_ONLYCONVERTING : 0);
(dcl, init, NULL_TREE, 1, /*init ? LOOKUP_ONLYCONVERTING :*/ 0);
resume_momentary (i);
return dcl;
}
......
......@@ -3508,8 +3508,7 @@ add_conversions (binfo)
tree tmp = TREE_VEC_ELT (method_vec, i);
if (! IDENTIFIER_TYPENAME_P (DECL_NAME (tmp)))
break;
conversions = tree_cons (TREE_TYPE (TREE_TYPE (tmp)), tmp,
conversions);
conversions = tree_cons (binfo, tmp, conversions);
}
}
......
......@@ -5370,7 +5370,7 @@ expand_target_expr (t)
do_pending_stack_adjust ();
start_sequence_for_rtl_expr (xval);
emit_note (0, -1);
rtxval = expand_expr (t, NULL, VOIDmode, 0);
rtxval = expand_expr (t, NULL_RTX, VOIDmode, 0);
do_pending_stack_adjust ();
TREE_SIDE_EFFECTS (xval) = 1;
RTL_EXPR_SEQUENCE (xval) = get_insns ();
......@@ -5803,7 +5803,7 @@ build_modify_expr (lhs, modifycode, rhs)
expanded without a target. */
if (TREE_CODE (newrhs) == TARGET_EXPR)
newrhs = build (COMPOUND_EXPR, TREE_TYPE (newrhs), newrhs,
TREE_VALUE (newrhs));
TREE_OPERAND (newrhs, 0));
}
if (TREE_CODE (newrhs) == ERROR_MARK)
......
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