Translate [%ocaml.extension_constructor <path>] to the
runtime-representation of the extension constructor denoted by
<path>. This allows one to get the extension constructor without
having to create a dummy value.
From comments in typedtree.mli:
When introduced in 2000, this [type] enabled a more efficient code
generation for optional arguments. However, today the information is
redundant as labels are passed to [transl_apply] too. Could be cleaned
up.
- float
- int32
- int64
- nativeint
Not for int because the comparison is done directly on the untagged version.
Useful mainly for floats since they can be stored unboxed in records or arrays.
Adding [@unboxed] (resp [@untagged]) on a primitive argument means
that the argument must passed unboxed (resp untagged) to the external
function. Adding [@unboxed] (resp [@untagged]) on the result means
that the external function returns its result unboxed (resp untagged).
The unboxing (resp untagging) method is derived from the type.
Currently unboxing is suported for: float, int32, int64 and nativeint.
Untagging is supported for int.
This patch also increases the cm{i,o,a,x,xa} magic numbers as the type
Primitive.description is changed.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16382 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
This commit introduces a new syntax for index operators.
Six core parenthesis operator are added:
.(), .[], .{}, .{,}, .{,,}, .{,..,}.
The .{,}/.{,,}/.{,,,} operators are defined for compatibility with the Bigarray syntax extension.
Each core index operator is available in a access/assignement versions. For instance, .() is declined in
* .() : index operator
* .()<- : indexed assignment operator
The general syntax for these index operators as implemented in the parser is index_operator::= index_operator_core [<-]
From: octachron <octa@polychoron.fr>
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15660 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
It allows to have non-standard limits for non-standard runtime.
ie: js_of_ocaml use 32bits integer, and can handle
string much bigger than 16Mo.
From: Hugo Heuzard <hugo.heuzard@gmail.com>
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15588 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
After applying this patch, you should run:
make library-cross
make promote-cross
make partialclean
make ocamlc ocamllex ocamltools
and then immediately apply the following patches until the "second
part of Benoît Vaugon's format+gadts patch"; the bootstrap cycle is
not finished yet.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14806 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
of size 2, with tag = Object_tag, the first field being the pointer to the string, and second one being a unique id, generated
from the same sequence as for object values. Special case for predefined exceptions, represented with a negative id.
The unique id generator is moved from camlinternalOO to the C runtime system.
Also fix some bugs.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/raise_variants@14239 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Namely, you can write "module L = List" in signatures,
and avoid have the compiler use directly List when you write L.
See examples in testsuite/tests/typing-modules/aliases.ml
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/module-alias@14196 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02