469 lines
4.5 KiB
HTML
469 lines
4.5 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML><HEAD><TITLE>Man page of Stdlib.Obj</TITLE>
|
|
</HEAD><BODY>
|
|
<H1>Stdlib.Obj</H1>
|
|
Section: OCaml library (3o)<BR>Updated: 2020-01-30<BR><A HREF="#index">Index</A>
|
|
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
|
|
|
|
<A NAME="lbAB"> </A>
|
|
<H2>NAME</H2>
|
|
|
|
Stdlib.Obj - no description
|
|
<A NAME="lbAC"> </A>
|
|
<H2>Module</H2>
|
|
|
|
Module Stdlib.Obj
|
|
<A NAME="lbAD"> </A>
|
|
<H2>Documentation</H2>
|
|
|
|
<P>
|
|
Module
|
|
<B>Obj</B>
|
|
|
|
<BR> :
|
|
<B>(module Stdlib__obj)</B>
|
|
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<I>type t </I>
|
|
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<I>val repr </I>
|
|
|
|
:
|
|
<B>'a -> t</B>
|
|
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<I>val obj </I>
|
|
|
|
:
|
|
<B>t -> 'a</B>
|
|
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<I>val magic </I>
|
|
|
|
:
|
|
<B>'a -> 'b</B>
|
|
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<I>val is_block </I>
|
|
|
|
:
|
|
<B>t -> bool</B>
|
|
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<I>val is_int </I>
|
|
|
|
:
|
|
<B>t -> bool</B>
|
|
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<I>val tag </I>
|
|
|
|
:
|
|
<B>t -> int</B>
|
|
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<I>val size </I>
|
|
|
|
:
|
|
<B>t -> int</B>
|
|
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<I>val reachable_words </I>
|
|
|
|
:
|
|
<B>t -> int</B>
|
|
|
|
<P>
|
|
Computes the total size (in words, including the headers) of all
|
|
heap blocks accessible from the argument. Statically
|
|
allocated blocks are excluded.
|
|
<P>
|
|
@Since 4.04
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<I>val field </I>
|
|
|
|
:
|
|
<B>t -> int -> t</B>
|
|
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<I>val set_field </I>
|
|
|
|
:
|
|
<B>t -> int -> t -> unit</B>
|
|
|
|
<P>
|
|
When using flambda:
|
|
<P>
|
|
<P>
|
|
<B>set_field</B>
|
|
|
|
MUST NOT be called on immutable blocks. (Blocks allocated
|
|
in C stubs, or with
|
|
<B>new_block</B>
|
|
|
|
below, are always considered mutable.)
|
|
<P>
|
|
The same goes for
|
|
<B>set_double_field</B>
|
|
|
|
and
|
|
<B>set_tag</B>
|
|
|
|
. However, for
|
|
<B>set_tag</B>
|
|
|
|
, in the case of immutable blocks where the middle-end optimizers
|
|
never see code that discriminates on their tag (for example records), the
|
|
operation should be safe. Such uses are nonetheless discouraged.
|
|
<P>
|
|
For experts only:
|
|
<B>set_field</B>
|
|
|
|
et al can be made safe by first wrapping the block in
|
|
<B>Sys.opaque_identity</B>
|
|
|
|
, so any information about its contents will not
|
|
be propagated.
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<I>val set_tag </I>
|
|
|
|
:
|
|
<B>t -> int -> unit</B>
|
|
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<I>val double_field </I>
|
|
|
|
:
|
|
<B>t -> int -> float</B>
|
|
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<I>val set_double_field </I>
|
|
|
|
:
|
|
<B>t -> int -> float -> unit</B>
|
|
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<I>val new_block </I>
|
|
|
|
:
|
|
<B>int -> int -> t</B>
|
|
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<I>val dup </I>
|
|
|
|
:
|
|
<B>t -> t</B>
|
|
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<I>val truncate </I>
|
|
|
|
:
|
|
<B>t -> int -> unit</B>
|
|
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<I>val add_offset </I>
|
|
|
|
:
|
|
<B>t -> Int32.t -> t</B>
|
|
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<I>val first_non_constant_constructor_tag </I>
|
|
|
|
:
|
|
<B>int</B>
|
|
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<I>val last_non_constant_constructor_tag </I>
|
|
|
|
:
|
|
<B>int</B>
|
|
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<I>val lazy_tag </I>
|
|
|
|
:
|
|
<B>int</B>
|
|
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<I>val closure_tag </I>
|
|
|
|
:
|
|
<B>int</B>
|
|
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<I>val object_tag </I>
|
|
|
|
:
|
|
<B>int</B>
|
|
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<I>val infix_tag </I>
|
|
|
|
:
|
|
<B>int</B>
|
|
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<I>val forward_tag </I>
|
|
|
|
:
|
|
<B>int</B>
|
|
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<I>val no_scan_tag </I>
|
|
|
|
:
|
|
<B>int</B>
|
|
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<I>val abstract_tag </I>
|
|
|
|
:
|
|
<B>int</B>
|
|
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<I>val string_tag </I>
|
|
|
|
:
|
|
<B>int</B>
|
|
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<I>val double_tag </I>
|
|
|
|
:
|
|
<B>int</B>
|
|
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<I>val double_array_tag </I>
|
|
|
|
:
|
|
<B>int</B>
|
|
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<I>val custom_tag </I>
|
|
|
|
:
|
|
<B>int</B>
|
|
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<I>val final_tag </I>
|
|
|
|
:
|
|
<B>int</B>
|
|
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<I>val int_tag </I>
|
|
|
|
:
|
|
<B>int</B>
|
|
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<I>val out_of_heap_tag </I>
|
|
|
|
:
|
|
<B>int</B>
|
|
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<I>val unaligned_tag </I>
|
|
|
|
:
|
|
<B>int</B>
|
|
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<I>module Extension_constructor : </I>
|
|
|
|
<B>sig end</B>
|
|
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<I>val extension_constructor </I>
|
|
|
|
:
|
|
<B>'a -> extension_constructor</B>
|
|
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<I>val extension_name </I>
|
|
|
|
:
|
|
<B>extension_constructor -> string</B>
|
|
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<I>val extension_id </I>
|
|
|
|
:
|
|
<B>extension_constructor -> int</B>
|
|
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<P>
|
|
|
|
The following two functions are deprecated. Use module
|
|
<B>Marshal</B>
|
|
|
|
instead.
|
|
<P>
|
|
|
|
<P>
|
|
<I>val marshal </I>
|
|
|
|
:
|
|
<B>t -> bytes</B>
|
|
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<I>val unmarshal </I>
|
|
|
|
:
|
|
<B>bytes -> int -> t * int</B>
|
|
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<I>module Ephemeron : </I>
|
|
|
|
<B>sig end</B>
|
|
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<P>
|
|
|
|
<HR>
|
|
<A NAME="index"> </A><H2>Index</H2>
|
|
<DL>
|
|
<DT id="1"><A HREF="#lbAB">NAME</A><DD>
|
|
<DT id="2"><A HREF="#lbAC">Module</A><DD>
|
|
<DT id="3"><A HREF="#lbAD">Documentation</A><DD>
|
|
</DL>
|
|
<HR>
|
|
This document was created by
|
|
<A HREF="/cgi-bin/man/man2html">man2html</A>,
|
|
using the manual pages.<BR>
|
|
Time: 00:05:57 GMT, March 31, 2021
|
|
</BODY>
|
|
</HTML>
|