Skip to content

Commit

Permalink
Clean
Browse files Browse the repository at this point in the history
  • Loading branch information
hhugo committed Apr 18, 2024
1 parent df5ec74 commit c7c009b
Show file tree
Hide file tree
Showing 3 changed files with 169 additions and 363 deletions.
2 changes: 2 additions & 0 deletions compiler/lib/flow.ml
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,8 @@ let rec the_shape_of info x =
match info.info_defs.(Var.idx x) with
| Expr (Block (_, a, _, Immutable)) ->
Shape.Block (List.map ~f:(the_shape_of info) (Array.to_list a))
| Expr (Block (_, a, _, _)) when not (Var.ISet.mem info.info_possibly_mutable x)
-> Shape.Block (List.map ~f:(the_shape_of info) (Array.to_list a))
| Expr (Closure (l, _)) ->
Shape.Function { arity = List.length l; pure = false; res = Top "unk" }
| Expr (Special (Alias_prim name)) -> (
Expand Down
2 changes: 1 addition & 1 deletion compiler/tests-compiler/gh747.ml
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ end
1:
2: //# unitInfo: Provides: Test
3: //# unitInfo: Requires: Stdlib__Printf
4: //# shape: Test:[N,N,[N],N,N,N,N,N,N,N,N,N,N,F(2),F(2),[F(4)]]
4: //# shape: Test:[N,N,[N],N,N,N,N,N,N,N,N,N,[N,N],F(2),F(2),[F(4)]]
5: (function
6: (globalThis){
7: "use strict";
Expand Down
Loading

0 comments on commit c7c009b

Please sign in to comment.