summaryrefslogtreecommitdiff
path: root/compiler/Interpreter.ml
diff options
context:
space:
mode:
authorSon Ho2022-12-09 16:51:40 +0100
committerSon HO2023-02-03 11:21:46 +0100
commite6edaac99fc38fc3cb574db06fe83c7eb32ef37b (patch)
tree8d609e91a58ae729401ff6efb2450e41103367f6 /compiler/Interpreter.ml
parentc86ecc916f9493bf312aa3f156e07da3bc415e77 (diff)
Merge loop abs so that there is one abs per function input region group
Diffstat (limited to '')
-rw-r--r--compiler/Interpreter.ml11
1 files changed, 8 insertions, 3 deletions
diff --git a/compiler/Interpreter.ml b/compiler/Interpreter.ml
index ec1b6260..4b030088 100644
--- a/compiler/Interpreter.ml
+++ b/compiler/Interpreter.ml
@@ -29,12 +29,14 @@ let compute_type_fun_global_contexts (m : A.crate) :
let initialize_eval_context (type_context : C.type_context)
(fun_context : C.fun_context) (global_context : C.global_context)
- (type_vars : T.type_var list) : C.eval_ctx =
+ (region_groups : T.RegionGroupId.id list) (type_vars : T.type_var list) :
+ C.eval_ctx =
C.reset_global_counters ();
{
C.type_context;
C.fun_context;
C.global_context;
+ C.region_groups;
C.type_vars;
C.env = [ C.Frame ];
C.ended_regions = T.RegionId.Set.empty;
@@ -69,9 +71,12 @@ let initialize_symbolic_context_for_fun (type_context : C.type_context)
* *)
let sg = fdef.signature in
(* Create the context *)
+ let region_groups =
+ List.map (fun (g : T.region_var_group) -> g.id) sg.regions_hierarchy
+ in
let ctx =
initialize_eval_context type_context fun_context global_context
- sg.type_params
+ region_groups sg.type_params
in
(* Instantiate the signature *)
let type_params = List.map (fun tv -> T.TypeVar tv.T.index) sg.type_params in
@@ -312,7 +317,7 @@ module Test = struct
compute_type_fun_global_contexts crate
in
let ctx =
- initialize_eval_context type_context fun_context global_context []
+ initialize_eval_context type_context fun_context global_context [] []
in
(* Insert the (uninitialized) local variables *)