Add logging to type and effect.
This commit is contained in:
parent
2a1d88ae00
commit
861423989d
|
@ -34,6 +34,11 @@ let mutability_checking_visitor
|
|||
in
|
||||
|
||||
let check_write s dst =
|
||||
let _ =
|
||||
iflog cx
|
||||
(fun _ -> log cx "checking write to lval #%d = %a"
|
||||
(int_of_node (lval_base_id dst)) Ast.sprintf_lval dst)
|
||||
in
|
||||
let dst_ty = lval_ty cx dst in
|
||||
let is_mutable =
|
||||
match dst_ty with
|
||||
|
|
|
@ -1405,6 +1405,13 @@ let process_crate (cx:ctxt) (crate:Ast.crate) : unit =
|
|||
|
||||
let record_lval_ty id tv =
|
||||
let ty = get_resolved_ty tv id in
|
||||
let _ =
|
||||
iflog cx
|
||||
(fun _ ->
|
||||
log cx "recording resolved lval #%d type %a"
|
||||
(int_of_node id)
|
||||
Ast.sprintf_ty ty)
|
||||
in
|
||||
Hashtbl.add cx.ctxt_all_lval_types id ty
|
||||
in
|
||||
|
||||
|
|
Loading…
Reference in New Issue