File tree 4 files changed +12
-12
lines changed 4 files changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -402,7 +402,7 @@ let rec the_shape_of info x =
402
402
info
403
403
(fun x ->
404
404
if Var.ISet. mem info.info_possibly_mutable x
405
- then Shape. Bot " possibly_mutable"
405
+ then Shape. Top " possibly_mutable"
406
406
else
407
407
match Shape. get x with
408
408
| Some shape -> shape
@@ -411,16 +411,16 @@ let rec the_shape_of info x =
411
411
| Expr (Block (_ , a , _ , Immutable)) ->
412
412
Shape. Block (List. map ~f: (the_shape_of info) (Array. to_list a))
413
413
| Expr (Closure (l , _ )) ->
414
- Shape. Function { arity = List. length l; pure = false ; res = Bot " unk" }
414
+ Shape. Function { arity = List. length l; pure = false ; res = Top " unk" }
415
415
| Expr (Special (Alias_prim name )) -> (
416
416
try
417
417
let arity = Primitive. arity name in
418
418
let pure = Primitive. is_pure name in
419
- Shape. Function { arity; pure; res = Bot " unk" }
420
- with _ -> Bot " other" )
421
- | _ -> Shape. Bot " other" ))
422
- (Bot " init" )
423
- (fun _u _v -> Shape. Bot " merge" )
419
+ Shape. Function { arity; pure; res = Top " unk" }
420
+ with _ -> Top " other" )
421
+ | _ -> Shape. Top " other" ))
422
+ (Top " init" )
423
+ (fun _u _v -> Shape. Top " merge" )
424
424
x
425
425
426
426
let build_subst (info : Info.t ) vars =
Original file line number Diff line number Diff line change 20
20
open ! Stdlib
21
21
22
22
type t =
23
- | Bot of string
23
+ | Top of string
24
24
| Block of t list
25
25
| Function of
26
26
{ arity : int
@@ -30,7 +30,7 @@ type t =
30
30
31
31
let rec to_string (shape : t ) =
32
32
match shape with
33
- | Bot s -> if true then " N" else Printf. sprintf " N(%s)" s
33
+ | Top s -> if true then " N" else Printf. sprintf " N(%s)" s
34
34
| Block l -> " [" ^ String. concat ~sep: " ," (List. map ~f: to_string l) ^ " ]"
35
35
| Function { arity; _ } -> Printf. sprintf " F(%d)" arity
36
36
@@ -59,7 +59,7 @@ let assign x shape = Hashtbl.add state (Var x) shape
59
59
let propagate x offset target =
60
60
match Hashtbl. find_opt state (Var x) with
61
61
| None -> ()
62
- | Some (Bot _ | Function _ ) -> ()
62
+ | Some (Top _ | Function _ ) -> ()
63
63
| Some (Block l ) -> Hashtbl. replace state (Var target) (List. nth l offset)
64
64
65
65
let get x = Hashtbl. find_opt state (Var x)
Original file line number Diff line number Diff line change 18
18
*)
19
19
20
20
type t =
21
- | Bot of string
21
+ | Top of string
22
22
| Block of t list
23
23
| Function of
24
24
{ arity : int
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ let function_arity info x =
27
27
| Some shape -> (
28
28
match shape with
29
29
| Function { arity; _ } -> Some arity
30
- | Block _ | Bot _ -> None )
30
+ | Block _ | Top _ -> None )
31
31
| None ->
32
32
get_approx
33
33
info
You can’t perform that action at this time.
0 commit comments