@@ -46,22 +46,16 @@ external field : t -> int -> t = "%obj_field"
46
46
47
47
(* * When using flambda:
48
48
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.)
56
52
57
53
For experts only:
58
54
[set_field] et al can be made safe by first wrapping the block in
59
55
{!Sys.opaque_identity}, so any information about its contents will not
60
56
be propagated.
61
57
*)
62
58
external 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." ]
65
59
66
60
val [@ inline always] double_field : t -> int -> float (* @since 3.11.2 *)
67
61
val [@ inline always] set_double_field : t -> int -> float -> unit
@@ -75,8 +69,6 @@ external set_raw_field : t -> int -> raw_data -> unit
75
69
76
70
external new_block : int -> int -> t = " caml_obj_block"
77
71
external dup : t -> t = " caml_obj_dup"
78
- external truncate : t -> int -> unit = " caml_obj_truncate"
79
- [@@ ocaml.deprecated]
80
72
external add_offset : t -> Int32 .t -> t = " caml_obj_add_offset"
81
73
(* @since 3.12.0 *)
82
74
external with_tag : int -> t -> t = " caml_obj_with_tag"
0 commit comments