From 65a87a55a1795ecf1485ab1c3ac6f5af1e792bf7 Mon Sep 17 00:00:00 2001 From: Graydon Hoare Date: Thu, 1 Jul 2010 19:29:51 -0700 Subject: Remove too-optimistic (and not harmless) over application of auto-deref in trans. --- src/boot/me/trans.ml | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/boot/me/trans.ml b/src/boot/me/trans.ml index 1183a23e..6e73fbe4 100644 --- a/src/boot/me/trans.ml +++ b/src/boot/me/trans.ml @@ -1243,19 +1243,15 @@ let trans_visitor | Ast.LIT_mach (m, n, _) -> imm_of_ty n m and trans_atom (atom:Ast.atom) : Il.operand = - trans_atom_full DEREF_all_boxes atom - - and trans_atom_full (dctrl:deref_ctrl) (atom:Ast.atom) : Il.operand = iflog begin fun _ -> annotate (Fmt.fmt_to_str Ast.fmt_atom atom) end; - match atom with Ast.ATOM_lval lv -> let (cell, ty) = trans_lval lv in - Il.Cell (fst (deref_ty dctrl false cell ty)) + Il.Cell (fst (deref_ty DEREF_none false cell ty)) | Ast.ATOM_literal lit -> trans_lit lit.node @@ -3082,7 +3078,7 @@ let trans_visitor get_forwarding_vtbl caller_obj_ty callee_obj_ty in let (caller_obj, _) = - deref_ty DEREF_all_boxes initializing dst_cell dst_ty + deref_ty DEREF_none initializing dst_cell dst_ty in let caller_vtbl = get_element_ptr caller_obj Abi.binding_field_item @@ -4214,7 +4210,7 @@ let trans_visitor bugi cx stmt.id "non-rec destination type in stmt_init_rec" in - let (dst_cell, _) = deref_ty DEREF_all_boxes true slot_cell ty in + let (dst_cell, _) = deref_ty DEREF_none true slot_cell ty in begin match base with None -> @@ -4235,7 +4231,7 @@ let trans_visitor bugi cx stmt.id "non-tup destination type in stmt_init_tup" in - let (dst_cell, _) = deref_ty DEREF_all_boxes true slot_cell ty in + let (dst_cell, _) = deref_ty DEREF_none true slot_cell ty in trans_init_structural_from_atoms dst_cell dst_tys atoms -- cgit v1.2.3