File tree Expand file tree Collapse file tree 5 files changed +487
-17
lines changed
Expand file tree Collapse file tree 5 files changed +487
-17
lines changed Original file line number Diff line number Diff line change @@ -36,6 +36,7 @@ module Generate (Target : Target_sig.S) = struct
3636 { live : int array
3737 ; in_cps : Effects .in_cps
3838 ; deadcode_sentinal : Var .t
39+ ; types : Typing .typ Var.Tbl .t [@ warning "-69" ]
3940 ; blocks : block Addr.Map .t
4041 ; closures : Closure_conversion .closure Var.Map .t
4142 ; global_context : Code_generation .context
@@ -1183,7 +1184,8 @@ module Generate (Target : Target_sig.S) = struct
11831184 ~should_export
11841185 ~warn_on_unhandled_effect
11851186*)
1186- ~deadcode_sentinal =
1187+ ~deadcode_sentinal
1188+ ~types =
11871189 global_context.unit_name < - unit_name;
11881190 let p, closures = Closure_conversion. f p in
11891191 (*
@@ -1193,6 +1195,7 @@ module Generate (Target : Target_sig.S) = struct
11931195 { live = live_vars
11941196 ; in_cps
11951197 ; deadcode_sentinal
1198+ ; types
11961199 ; blocks = p.blocks
11971200 ; closures
11981201 ; global_context
@@ -1301,8 +1304,10 @@ let start () = make_context ~value_type:Gc_target.Type.value
13011304
13021305let f ~context ~unit_name p ~live_vars ~in_cps ~deadcode_sentinal =
13031306 let t = Timer. make () in
1307+ let state, info = Global_flow. f' ~fast: false p in
1308+ let types = Typing. f ~state ~info p in
13041309 let p = fix_switch_branches p in
1305- let res = G. f ~context ~unit_name ~live_vars ~in_cps ~deadcode_sentinal p in
1310+ let res = G. f ~context ~unit_name ~live_vars ~in_cps ~deadcode_sentinal ~types p in
13061311 if times () then Format. eprintf " code gen.: %a@." Timer. print t;
13071312 res
13081313
You can’t perform that action at this time.
0 commit comments