Skip to content

Commit

Permalink
misc
Browse files Browse the repository at this point in the history
  • Loading branch information
d-kalinichenko committed Nov 13, 2024
1 parent 807b70f commit 21619a7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions tools/dumpobj.ml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ open Printf

let print_banners = ref true
let print_locations = ref true
let print_reloc_info = ref true
let print_reloc_info = ref false

(* Read signed and unsigned integers *)

Expand Down Expand Up @@ -78,7 +78,7 @@ let record_events orig evl =
let same_custom x y =
Nativeint.equal (Obj.raw_field x 0) (Obj.raw_field (Obj.repr y) 0)

external is_null : Obj.t -> bool = "caml_is_null"
external is_null : Obj.t -> bool = "%is_null"

let rec print_obj x =
if is_null x then
Expand Down
6 changes: 4 additions & 2 deletions toplevel/genprintval.ml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ module Make(O : OBJ)(EVP : EVALPATH with type valu = O.t) = struct

type t = O.t

external is_null : O.t -> bool = "caml_is_null"
external is_null : O.t -> bool = "%is_null"

module ObjTbl = Hashtbl.Make(struct
type t = O.t
Expand Down Expand Up @@ -443,8 +443,10 @@ module Make(O : OBJ)(EVP : EVALPATH with type valu = O.t) = struct
constr_list, cstr_arg_jkinds
with
| Datarepr.Constr_not_found | Not_found ->
(* If a [Variant_with_null] is not a [Null],
it's guaranteed to be [This value]. *)
match rep with
| Variant_with_null -> List.hd (List.tl constr_list),
| Variant_with_null -> List.nth constr_list 1,
[| Jkind.Builtin.value ~why:(Type_argument {
parent_path = path;
position = 1;
Expand Down

0 comments on commit 21619a7

Please sign in to comment.