@@ -585,7 +585,6 @@ module State = struct
585585 ; globals : globals
586586 ; immutable : unit Code.Var.Hashtbl .t
587587 ; module_or_not : Ocaml_compiler .module_or_not Ident.Tbl .t
588- ; includes : string list
589588 }
590589
591590 let fresh_var state =
@@ -670,7 +669,7 @@ module State = struct
670669
671670 let pop_handler state = { state with handlers = List. tl state.handlers }
672671
673- let initial includes g immutable =
672+ let initial g immutable =
674673 { accu = Unset
675674 ; stack = []
676675 ; env = [||]
@@ -679,7 +678,6 @@ module State = struct
679678 ; globals = g
680679 ; immutable
681680 ; module_or_not = Ident.Tbl. create 0
682- ; includes
683681 }
684682
685683 let rec print_stack f l =
@@ -829,7 +827,7 @@ let get_global state instrs i =
829827 (match g.named_value.(i) with
830828 | None -> ()
831829 | Some name -> (
832- match Shape.Store. load ~name ~paths: state.includes with
830+ match Shape.Store. load ~name with
833831 | None -> ()
834832 | Some shape -> Shape.State. assign x shape));
835833 x, state, instrs
@@ -2548,9 +2546,9 @@ type one =
25482546 ; debug : Debug .summary
25492547 }
25502548
2551- let parse_bytecode ~ includes code globals debug_data =
2549+ let parse_bytecode code globals debug_data =
25522550 let immutable = Code.Var.Hashtbl. create 0 in
2553- let state = State. initial includes globals immutable in
2551+ let state = State. initial globals immutable in
25542552 Code.Var. reset () ;
25552553 let blocks', joins = Blocks. analyse code in
25562554 Shape.State. reset () ;
@@ -2730,7 +2728,7 @@ let from_exe
27302728 Ocaml_compiler.Symtable.GlobalMap. iter symbols ~f: (fun id n ->
27312729 globals.named_value.(n) < - Some (Ocaml_compiler.Symtable.Global. name id);
27322730 globals.is_exported.(n) < - true );
2733- let p = parse_bytecode ~includes code globals debug_data in
2731+ let p = parse_bytecode code globals debug_data in
27342732 (* register predefined exception *)
27352733 let body =
27362734 List. fold_left predefined_exceptions ~init: [] ~f: (fun body (i , name ) ->
@@ -2860,7 +2858,7 @@ let from_bytes ~prims ~debug (code : bytecode) =
28602858 t
28612859 in
28622860 let globals = make_globals 0 [||] prims in
2863- let p = parse_bytecode ~includes: [] code globals debug_data in
2861+ let p = parse_bytecode code globals debug_data in
28642862 let gdata = Var. fresh_n " global_data" in
28652863 let need_gdata = ref false in
28662864 let find_name i =
@@ -2992,7 +2990,7 @@ module Reloc = struct
29922990 globals
29932991end
29942992
2995- let from_compilation_units ~includes ~include_cmis ~debug_data l =
2993+ let from_compilation_units ~includes : _ ~include_cmis ~debug_data l =
29962994 let reloc = Reloc. create () in
29972995 List. iter l ~f: (fun (compunit , code ) -> Reloc. step1 reloc compunit code);
29982996 List. iter l ~f: (fun (compunit , code ) -> Reloc. step2 reloc compunit code);
@@ -3001,7 +2999,7 @@ let from_compilation_units ~includes ~include_cmis ~debug_data l =
30012999 let l = List. map l ~f: (fun (_ , c ) -> Bytes. to_string c) in
30023000 String. concat ~sep: " " l
30033001 in
3004- let prog = parse_bytecode ~includes code globals debug_data in
3002+ let prog = parse_bytecode code globals debug_data in
30053003 let gdata = Var. fresh_n " global_data" in
30063004 let need_gdata = ref false in
30073005 let body =
0 commit comments