Skip to content

Commit

Permalink
fixup! Effects: partial CPS transform
Browse files Browse the repository at this point in the history
  • Loading branch information
vouillon committed Jan 18, 2023
1 parent 1998e9e commit d2f9d2f
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions compiler/lib/global_flow.ml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ blocks, to track functions across modules.

open! Stdlib

let debug = Debug.find "flow2"
let debug = Debug.find "global-flow"

let times = Debug.find "times"

Expand Down Expand Up @@ -133,11 +133,9 @@ let rec arg_deps st ?ignore params args =
| x :: params, y :: args ->
(* This is to deal with the [else] clause of a conditional,
where we know that the value of the tested variable is 0. *)
if not
(match ignore with
| Some y' -> Var.equal y y'
| _ -> false)
then add_assign_def st x y;
(match ignore with
| Some y' when Var.equal y y' -> ()
| _ -> add_assign_def st x y);
arg_deps st params args
| _ -> ()

Expand Down Expand Up @@ -566,7 +564,7 @@ let f p =
Var.ISet.iter
(fun x ->
let s = Var.Tbl.get approximation x in
if true || not (Poly.( = ) s Domain.bot)
if not (Domain.equal s Domain.bot)
then
Format.eprintf
"%a: %a@."
Expand Down

0 comments on commit d2f9d2f

Please sign in to comment.