Skip to content

Commit 5ad58df

Browse files
committed
Compiler: small cleanup
1 parent ba132d7 commit 5ad58df

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

compiler/lib/generate.ml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -580,7 +580,6 @@ type state =
580580
; dom : Structure.graph
581581
; visited_blocks : Addr.Set.t ref
582582
; ctx : Ctx.t
583-
; blocks : Code.block Addr.Map.t
584583
}
585584

586585
module DTree = struct
@@ -699,10 +698,9 @@ end
699698

700699
let build_graph ctx pc =
701700
let visited_blocks = ref Addr.Set.empty in
702-
let blocks = ctx.Ctx.blocks in
703-
let structure = Structure.build_graph blocks pc in
701+
let structure = Structure.build_graph ctx.Ctx.blocks pc in
704702
let dom = Structure.dominator_tree structure in
705-
{ visited_blocks; structure; dom; ctx; blocks }
703+
{ visited_blocks; structure; dom; ctx }
706704

707705
(****)
708706

@@ -1443,7 +1441,7 @@ and compile_block_no_loop st queue (pc : Addr.t) ~fall_through scope_stack =
14431441
assert false);
14441442
if debug () then Format.eprintf "Compiling block %d@;" pc;
14451443
st.visited_blocks := Addr.Set.add pc !(st.visited_blocks);
1446-
let block = Addr.Map.find pc st.blocks in
1444+
let block = Addr.Map.find pc st.ctx.blocks in
14471445
let seq, queue = translate_instrs st.ctx queue block.body block.branch in
14481446
let nbbranch =
14491447
match fst block.branch with

0 commit comments

Comments
 (0)