Re: Obj module

From: doligez@pa.dec.com
Date: Wed Jan 20 1999 - 00:17:59 MET


From: doligez@pa.dec.com
Message-Id: <199901192317.AA08949@six.pa.dec.com>
To: Hendrik Tews <tews@irritatie.cs.kun.nl>
Subject: Re: Obj module
In-Reply-To: Message of Tue, 19 Jan 1999 14:09:00 +0100
    from Hendrik Tews <tews@irritatie.cs.kun.nl>
Date: Tue, 19 Jan 1999 15:17:59 -0800

>From: Hendrik Tews <tews@irritatie.cs.kun.nl>

>where can I find documentation on the Obj module in the standard
>library?

This module is deliberately undocumented because it breaks the type
system. If you use it, your program can crash or behave in erratic
ways. We don't document the module because we don't want spurious bug
reports from users who use it without knowing what they're doing.

More seriously, there is no way to document this module in an
implementation-independent way, and its behaviour is likely to change
with every release of O'Caml. Basically, the documentation is the
whole source code for the O'Caml compiler, runtime and libraries. If
you don't understand it, don't use Obj.

>Can somebody explain the meaning of those C primitives starting
>with a percent sign, eg "%identity"?

They are not really C primitives, but pseudo-primitives that are
recognised and implemented by the code generator itself, so the linker
will never see them. In the byte-code system, each of these is
expanded to one byte-code, in the native-code compiler, they are
replaced by a short sequence of instructions.

-- Damien



This archive was generated by hypermail 2b29 : Sun Jan 02 2000 - 11:58:18 MET