Skip to content

Commit

Permalink
Use the new access to variable definition from Bir, from PR #200
Browse files Browse the repository at this point in the history
  • Loading branch information
mdurero committed Jun 30, 2023
1 parent e3e06fd commit 1d4ead0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/mlang/backend_compilers/bir_to_ocaml.ml
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ let generate_local_defs (oc : Format.formatter)
(Format.pp_print_list ~pp_sep:pp_statement_separator format_local_set)
defs

let generate_var_def (variable : Bir.variable) (vdata : Bir.variable_data)
let generate_var_def (variable : Bir.variable) (def : Bir.variable_def)
(oc : Format.formatter) : unit =
let generate_one_var position oc (e : Bir.expression Pos.marked) : unit =
let tgv_expression, local_defs = generate_ocaml_expr e in
Expand All @@ -152,7 +152,7 @@ let generate_var_def (variable : Bir.variable) (vdata : Bir.variable_data)
(format_tgv_set tgv_expression)
position
in
match vdata.var_definition with
match def with
| SimpleVar e -> generate_one_var (get_var_pos variable) oc e
| TableVar (_, IndexTable es) ->
let bindings_list = Mir.IndexMap.bindings es in
Expand Down

0 comments on commit 1d4ead0

Please sign in to comment.