Skip to content

Commit

Permalink
Add constructor for Null type
Browse files Browse the repository at this point in the history
  • Loading branch information
lthls committed Oct 31, 2024
1 parent 791f39e commit 966e54a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions middle_end/flambda2/types/grammar/type_grammar.ml
Original file line number Diff line number Diff line change
Expand Up @@ -3194,6 +3194,9 @@ let box_vec128 (t : t) alloc_mode : t =
| Naked_int32 _ | Naked_int64 _ | Naked_nativeint _ | Rec_info _ | Region _ ->
Misc.fatal_errorf "Type of wrong kind for [box_vec128]: %a" print t

let null : t =
Value (TD.create { non_null = Bottom; is_null = Maybe_null })

let this_tagged_immediate imm : t =
Value (TD.create_equals (Simple.const (RWC.tagged_immediate imm)))

Expand Down
2 changes: 2 additions & 0 deletions middle_end/flambda2/types/grammar/type_grammar.mli
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,8 @@ val any_region : t

val any_rec_info : t

val null : t

val this_tagged_immediate : Targetint_31_63.t -> t

val this_rec_info : Rec_info_expr.t -> t
Expand Down

0 comments on commit 966e54a

Please sign in to comment.