@@ -78,8 +78,8 @@ let rec treat_exp exp args =
7878
7979
8080let value_binding super self x =
81- let old_later = ! DeadArg. later in
82- DeadArg. later := [] ;
81+ let at_eof_saved = ! DeadArg. at_eof in
82+ DeadArg. at_eof := [] ;
8383 incr depth;
8484 let open Asttypes in
8585 begin match x with
@@ -111,8 +111,8 @@ let value_binding super self x =
111111 end ;
112112
113113 let r = super.Tast_mapper. value_binding self x in
114- List. iter (fun f -> f() ) ! DeadArg. later ;
115- DeadArg. later := old_later ;
114+ List. iter (fun f -> f() ) ! DeadArg. at_eof ;
115+ DeadArg. at_eof := at_eof_saved ;
116116 decr depth;
117117 r
118118
@@ -406,9 +406,9 @@ let clean references loc =
406406 if (fn.[String. length fn - 1 ] <> 'i' && Utils. unit fn = sourceunit) then
407407 LocHash. remove references loc
408408
409- let eom loc_dep =
409+ let eof loc_dep =
410410 let state = State. get_current () in
411- DeadArg. eom () ;
411+ DeadArg. eof () ;
412412 List. iter (assoc decs) loc_dep;
413413 List. iter (assoc DeadType. decs) ! DeadType. dependencies;
414414 let sourcepath = State.File_infos. get_sourcepath state.State. file_infos in
@@ -422,8 +422,8 @@ let eom loc_dep =
422422 clean loc_dep;
423423 clean ! DeadType. dependencies;
424424 end ;
425- VdNode. eom () ;
426- DeadObj. eom () ;
425+ VdNode. eof () ;
426+ DeadObj. eof () ;
427427 DeadType. dependencies := [] ;
428428 Hashtbl. reset incl
429429
@@ -480,7 +480,7 @@ let rec load_file state fn =
480480 cmt_value_dependencies
481481 else []
482482 in
483- eom loc_dep
483+ eof loc_dep
484484 | _ -> () (* todo: support partial_implementation? *)
485485 )
486486
@@ -500,7 +500,7 @@ let rec load_file state fn =
500500
501501(* Prepare the list of opt_args for report *)
502502let analyze_opt_args () =
503- List. iter ( fun f -> f () ) ! DeadArg. last ;
503+ DeadArg. eocb () ;
504504 let all = ref [] in
505505 let tbl = Hashtbl. create 256 in
506506 let dec_loc loc = Hashtbl. mem main_files (Utils. unit loc.Lexing. pos_fname) in
0 commit comments