Add logging to trans_init_slot_from_atom.
This commit is contained in:
parent
6c9832d3ec
commit
7df949af40
1 changed files with 15 additions and 3 deletions
|
@ -3211,6 +3211,15 @@ let trans_visitor
|
||||||
(dst:Il.cell) (dst_slot:Ast.slot)
|
(dst:Il.cell) (dst_slot:Ast.slot)
|
||||||
(src_atom:Ast.atom)
|
(src_atom:Ast.atom)
|
||||||
: unit =
|
: unit =
|
||||||
|
let _ =
|
||||||
|
iflog (fun _ ->
|
||||||
|
log cx "trans_init_slot_from_atom";
|
||||||
|
log cx " dst slot %a, src ty %a"
|
||||||
|
Ast.sprintf_slot dst_slot
|
||||||
|
Ast.sprintf_ty (atom_type cx src_atom);
|
||||||
|
log cx " dst cell %s"
|
||||||
|
(cell_str dst))
|
||||||
|
in
|
||||||
match (dst_slot.Ast.slot_mode, clone, src_atom) with
|
match (dst_slot.Ast.slot_mode, clone, src_atom) with
|
||||||
(Ast.MODE_alias, CLONE_none,
|
(Ast.MODE_alias, CLONE_none,
|
||||||
Ast.ATOM_literal _) ->
|
Ast.ATOM_literal _) ->
|
||||||
|
@ -3225,9 +3234,12 @@ let trans_visitor
|
||||||
bug () "attempting to clone into alias slot"
|
bug () "attempting to clone into alias slot"
|
||||||
| _ ->
|
| _ ->
|
||||||
let src = Il.Mem (force_to_mem (trans_atom src_atom)) in
|
let src = Il.Mem (force_to_mem (trans_atom src_atom)) in
|
||||||
trans_init_slot_from_cell
|
begin
|
||||||
(get_ty_params_of_current_frame())
|
log cx " forced-to-mem src cell %s" (cell_str src);
|
||||||
clone dst dst_slot src (atom_type cx src_atom)
|
trans_init_slot_from_cell
|
||||||
|
(get_ty_params_of_current_frame())
|
||||||
|
clone dst dst_slot src (atom_type cx src_atom)
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
and trans_be_fn
|
and trans_be_fn
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue