@@ -46,22 +46,16 @@ external field : t -> int -> t = "%obj_field"
4646
4747(* * When using flambda:
4848
49- [set_field] MUST NOT be called on immutable blocks. (Blocks allocated
50- in C stubs, or with [new_block] below, are always considered mutable.)
51-
52- The same goes for [set_double_field] and [set_tag]. However, for
53- [set_tag], in the case of immutable blocks where the middle-end optimizers
54- never see code that discriminates on their tag (for example records), the
55- operation should be safe. Such uses are nonetheless discouraged.
49+ [set_field] and [set_double_field] MUST NOT be called on immutable
50+ blocks. (Blocks allocated in C stubs, or with [new_block] below,
51+ are always considered mutable.)
5652
5753 For experts only:
5854 [set_field] et al can be made safe by first wrapping the block in
5955 {!Sys.opaque_identity}, so any information about its contents will not
6056 be propagated.
6157*)
6258external set_field : t -> int -> t -> unit = " %obj_set_field"
63- external set_tag : t -> int -> unit = " caml_obj_set_tag"
64- [@@ ocaml.deprecated "Use with_tag instead." ]
6559
6660val [@ inline always] double_field : t -> int -> float (* @since 3.11.2 *)
6761val [@ inline always] set_double_field : t -> int -> float -> unit
@@ -75,8 +69,6 @@ external set_raw_field : t -> int -> raw_data -> unit
7569
7670external new_block : int -> int -> t = " caml_obj_block"
7771external dup : t -> t = " caml_obj_dup"
78- external truncate : t -> int -> unit = " caml_obj_truncate"
79- [@@ ocaml.deprecated]
8072external add_offset : t -> Int32 .t -> t = " caml_obj_add_offset"
8173 (* @since 3.12.0 *)
8274external with_tag : int -> t -> t = " caml_obj_with_tag"
0 commit comments