Skip to content

Commit 4c0bb73

Browse files
committed
QWE
1 parent f4c4a7f commit 4c0bb73

File tree

2 files changed

+14
-15
lines changed

2 files changed

+14
-15
lines changed

compiler/lib/flow.ml

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -515,18 +515,19 @@ let the_shape_of ~return_values ~pure info x =
515515
let pure = Primitive.is_pure name in
516516
Shape.Function { arity; pure; res = Top "unk" }
517517
with _ -> Top "other")
518-
| Expr (Apply { f; args; _ }) -> (
519-
let shape = loop info f (Var.Set.add f acc) in
520-
let rec loop n' shape =
521-
match shape with
522-
| Shape.Function { arity = n; pure; res } ->
523-
if n = n' then res
524-
else if n' < n
525-
then Shape.Function { arity = n - n'; pure; res }
526-
else loop (n' - n) res
527-
| Shape.Block _ | Shape.Top _ -> Shape.Top "apply2"
528-
in
529-
loop (List.length args) shape)
518+
| Expr (Apply { f; args; _ }) ->
519+
let shape = loop info f (Var.Set.add f acc) in
520+
let rec loop n' shape =
521+
match shape with
522+
| Shape.Function { arity = n; pure; res } ->
523+
if n = n'
524+
then res
525+
else if n' < n
526+
then Shape.Function { arity = n - n'; pure; res }
527+
else loop (n' - n) res
528+
| Shape.Block _ | Shape.Top _ -> Shape.Top "apply2"
529+
in
530+
loop (List.length args) shape
530531
| _ -> Shape.Top "other"))
531532
(Top "init")
532533
(fun u v -> merge u v)

compiler/lib/shape.ml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -151,9 +151,7 @@ module State = struct
151151

152152
let mem x = BitSet.mem t.cache (Code.Var.idx x)
153153

154-
let get x = if mem x then Code.Var.Hashtbl.find_opt t.table x
155-
else None
156-
154+
let get x = if mem x then Code.Var.Hashtbl.find_opt t.table x else None
157155

158156
let is_pure_fun x =
159157
match Code.Var.Hashtbl.find_opt t.table x with

0 commit comments

Comments
 (0)