diff options
| author | Graydon Hoare <[email protected]> | 2010-07-01 11:11:34 -0700 |
|---|---|---|
| committer | Graydon Hoare <[email protected]> | 2010-07-01 11:11:34 -0700 |
| commit | ef61c458fa3b2cf8d8e0619dd890b1023daff846 (patch) | |
| tree | ac4ca4d39a84f59c575f7035193d58b2d07c59f7 /src/boot | |
| parent | Remove redundant indirection-function. (diff) | |
| download | rust-ef61c458fa3b2cf8d8e0619dd890b1023daff846.tar.xz rust-ef61c458fa3b2cf8d8e0619dd890b1023daff846.zip | |
Add more logging to copy/init paths.
Diffstat (limited to 'src/boot')
| -rw-r--r-- | src/boot/me/trans.ml | 39 |
1 files changed, 27 insertions, 12 deletions
diff --git a/src/boot/me/trans.ml b/src/boot/me/trans.ml index d93a66e9..983a8a31 100644 --- a/src/boot/me/trans.ml +++ b/src/boot/me/trans.ml @@ -2873,6 +2873,11 @@ let trans_visitor iflog begin fun _ -> + log cx "trans_copy_ty"; + log cx " dst ty %a, src ty %a" + Ast.sprintf_ty dst_ty Ast.sprintf_ty src_ty; + log cx " dst cell %s, src cell %s" + (cell_str dst) (cell_str src); annotate (Printf.sprintf "%sweight copy: %a <- %a" weight @@ -3121,19 +3126,27 @@ let trans_visitor (src:Il.cell) (src_ty:Ast.ty) : unit = let dst_ty = slot_ty dst_slot in - match (dst_slot.Ast.slot_mode, clone) with - (Ast.MODE_alias, CLONE_none) -> - mov dst (Il.Cell (alias (Il.Mem (need_mem_cell src)))) + let _ = + iflog (fun _ -> + log cx "trans_init_slot_from_cell"; + log cx " dst slot %a, src ty %a" + Ast.sprintf_slot dst_slot Ast.sprintf_ty src_ty; + log cx " dst cell %s, src cell %s" + (cell_str dst) (cell_str src)) + in + match (dst_slot.Ast.slot_mode, clone) with + (Ast.MODE_alias, CLONE_none) -> + mov dst (Il.Cell (alias (Il.Mem (need_mem_cell src)))) - | (Ast.MODE_local, CLONE_none) -> - trans_copy_ty - ty_params true - dst dst_ty src src_ty None + | (Ast.MODE_local, CLONE_none) -> + trans_copy_ty + ty_params true + dst dst_ty src src_ty None - | (Ast.MODE_alias, _) -> - bug () "attempting to clone into alias slot" + | (Ast.MODE_alias, _) -> + bug () "attempting to clone into alias slot" - | (_, CLONE_chan clone_task) -> + | (_, CLONE_chan clone_task) -> let clone = if (type_contains_chan src_ty) then CLONE_all clone_task @@ -3143,8 +3156,8 @@ let trans_visitor trans_init_slot_from_cell ty_params clone dst dst_slot src src_ty - | (_, CLONE_all clone_task) -> - clone_ty ty_params clone_task dst src src_ty None + | (_, CLONE_all clone_task) -> + clone_ty ty_params clone_task dst src src_ty None and trans_init_slot_from_atom @@ -3354,6 +3367,8 @@ let trans_visitor (arg_slot:Ast.slot) (arg:Ast.atom) : unit = + log cx "trans_argN: arg slot %a, arg atom %a" + Ast.sprintf_slot arg_slot Ast.sprintf_atom arg; trans_init_slot_from_atom clone arg_cell arg_slot arg and code_of_cell (cell:Il.cell) : Il.code = |