@@ -87,7 +87,7 @@ type escape_status =
87
87
88
88
type state =
89
89
{ vars : Var.ISet .t (* Set of all veriables considered *)
90
- ; deps : Var .t Var.Tbl.DataSet .t Var.Tbl .t (* Dependency between variables *)
90
+ ; deps : Var .t list Var.Tbl .t (* Dependency between variables *)
91
91
; defs : def array (* Definition of each variable *)
92
92
; variable_may_escape : escape_status array
93
93
(* Any value bound to this variable may escape *)
@@ -114,7 +114,7 @@ type state =
114
114
let add_var st x = Var.ISet. add st.vars x
115
115
116
116
(* x depends on y *)
117
- let add_dep st x y = Var.Tbl. add_set st.deps y x
117
+ let add_dep st x y = Var.Tbl. set st.deps y (x :: Var.Tbl. get st.deps y)
118
118
119
119
let add_expr_def st x e =
120
120
add_var st x;
@@ -606,7 +606,7 @@ let solver st =
606
606
{ G. domain = st.vars
607
607
; G. iter_children =
608
608
(fun f x ->
609
- Var.Tbl.DataSet. iter f (Var.Tbl. get st.deps x);
609
+ List. iter ~ f (Var.Tbl. get st.deps x);
610
610
List. iter
611
611
~f: (fun g -> List. iter ~f (associated_list st.function_call_sites g))
612
612
(associated_list st.functions_from_returned_value x))
@@ -642,7 +642,7 @@ let f ~fast p =
642
642
let rets = return_values p in
643
643
let nv = Var. count () in
644
644
let vars = Var.ISet. empty () in
645
- let deps = Var.Tbl. make_set () in
645
+ let deps = Var.Tbl. make () [] in
646
646
let defs = Array. make nv undefined in
647
647
let variable_may_escape = Array. make nv No in
648
648
let variable_possibly_mutable = Var.ISet. empty () in
0 commit comments