Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 73 lines (59 sloc) 2.339 kb
fccc685 Initial open-source release
MLstate authored
1 (*
2 Copyright © 2011 MLstate
3
4 This file is part of OPA.
5
6 OPA is free software: you can redistribute it and/or modify it under the
7 terms of the GNU Affero General Public License, version 3, as published by
8 the Free Software Foundation.
9
10 OPA is distributed in the hope that it will be useful, but WITHOUT ANY
11 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12 FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
13 more details.
14
15 You should have received a copy of the GNU Affero General Public License
16 along with OPA. If not, see <http://www.gnu.org/licenses/>.
17 *)
18 (** The original Obj signature *)
19
20 type t = Obj.t
21 external repr : 'a -> t = "%identity"
22 external obj : t -> 'a = "%identity"
23 external magic : 'a -> 'b = "%identity"
24 external is_block : t -> bool = "caml_obj_is_block"
25 external is_int : t -> bool = "%obj_is_int"
26 external tag : t -> int = "caml_obj_tag"
27 external set_tag : t -> int -> unit = "caml_obj_set_tag"
28 external size : t -> int = "%obj_size"
29 external truncate : t -> int -> unit = "caml_obj_truncate"
30 external field : t -> int -> t = "%obj_field"
31 external set_field : t -> int -> t -> unit = "%obj_set_field"
32 external new_block : int -> int -> t = "caml_obj_block"
33 external dup : t -> t = "caml_obj_dup"
34
35 val lazy_tag : int
36 val closure_tag : int
37 val object_tag : int
38 val infix_tag : int
39 val forward_tag : int
40 val no_scan_tag : int
41 val abstract_tag : int
42 val string_tag : int
43 val double_tag : int
44 val double_array_tag : int
45 val custom_tag : int
46 val final_tag : int
47
48 val int_tag : int
49 val out_of_heap_tag : int
50 val unaligned_tag : int
51
52 val marshal : t -> string
53 val unmarshal : string -> int -> t * int
54
55 (** Additional functions *)
56
57 val dump : ?depth:int -> 'a -> string
58 (** creates a string of the runtime representation of value
59 This function is intented for low level debugging purpose
60 You should know the internal representation of (at least) algebraic datatypes
61 to understand the output of this function
62 *)
63
64 val print : ?prefix:string -> 'a -> unit
65 (** print the value to stdout, possibly prefixed by the given string *)
66
67 val native_runtime : bool
68 (** [native_runtime = true] when the code currently
69 executing is native code *)
70
71 val bytecode_runtime : bool
72 (** the opposite of the previous flag *)
Something went wrong with that request. Please try again.