1CamlinternalOO(3)                OCaml library               CamlinternalOO(3)
2
3
4

NAME

6       CamlinternalOO - Run-time support for objects and classes.
7

Module

9       Module   CamlinternalOO
10

Documentation

12       Module CamlinternalOO
13        : sig end
14
15
16       Run-time support for objects and classes.  All functions in this module
17       are for system use only, not for the casual user.
18
19
20
21
22
23
24
25   Classes
26       type tag
27
28
29
30
31       type label
32
33
34
35
36       type table
37
38
39
40
41       type meth
42
43
44
45
46       type t
47
48
49
50
51       type obj
52
53
54
55
56       type closure
57
58
59
60
61
62       val public_method_label : string -> tag
63
64
65
66
67       val new_method : table -> label
68
69
70
71
72       val new_variable : table -> string -> int
73
74
75
76
77       val new_methods_variables : table -> string array ->  string  array  ->
78       label array
79
80
81
82
83       val get_variable : table -> string -> int
84
85
86
87
88       val get_variables : table -> string array -> int array
89
90
91
92
93       val get_method_label : table -> string -> label
94
95
96
97
98       val get_method_labels : table -> string array -> label array
99
100
101
102
103       val get_method : table -> label -> meth
104
105
106
107
108       val set_method : table -> label -> meth -> unit
109
110
111
112
113       val set_methods : table -> label array -> unit
114
115
116
117
118       val  narrow  : table -> string array -> string array -> string array ->
119       unit
120
121
122
123
124       val widen : table -> unit
125
126
127
128
129       val add_initializer : table -> (obj -> unit) -> unit
130
131
132
133
134       val dummy_table : table
135
136
137
138
139       val create_table : string array -> table
140
141
142
143
144       val init_class : table -> unit
145
146
147
148
149       val inherits : table -> string array -> string array -> string array ->
150       t * (table -> obj -> Obj.t) * t * obj -> bool -> Obj.t array
151
152
153
154
155       val make_class : string array -> (table -> Obj.t -> t) -> t * (table ->
156       Obj.t -> t) * (Obj.t -> t) * Obj.t
157
158
159
160       type init_table
161
162
163
164
165
166       val make_class_store : string array -> (table -> t)  ->  init_table  ->
167       unit
168
169
170
171
172       val  dummy_class  :  string  * int * int -> t * (table -> Obj.t -> t) *
173       (Obj.t -> t) * Obj.t
174
175
176
177
178
179   Objects
180       val copy : (< .. > as 'a) -> 'a
181
182
183
184
185       val create_object : table -> obj
186
187
188
189
190       val create_object_opt : obj -> table -> obj
191
192
193
194
195       val run_initializers : obj -> table -> unit
196
197
198
199
200       val run_initializers_opt : obj -> obj -> table -> obj
201
202
203
204
205       val create_object_and_run_initializers : obj -> table -> obj
206
207
208
209
210       val send : obj -> tag -> t
211
212
213
214
215       val sendcache : obj -> tag -> t -> int -> t
216
217
218
219
220       val sendself : obj -> label -> t
221
222
223
224
225       val get_public_method : obj -> tag -> closure
226
227
228
229
230
231   Table cache
232       type tables
233
234
235
236
237
238       val lookup_tables : tables -> closure array -> tables
239
240
241
242
243
244   Builtins to reduce code size
245       type impl =
246        | GetConst
247        | GetVar
248        | GetEnv
249        | GetMeth
250        | SetVar
251        | AppConst
252        | AppVar
253        | AppEnv
254        | AppMeth
255        | AppConstConst
256        | AppConstVar
257        | AppConstEnv
258        | AppConstMeth
259        | AppVarConst
260        | AppEnvConst
261        | AppMethConst
262        | MethAppConst
263        | MethAppVar
264        | MethAppEnv
265        | MethAppMeth
266        | SendConst
267        | SendVar
268        | SendEnv
269        | SendMeth
270        | Closure of closure
271
272
273
274
275
276
277   Parameters
278       type params = {
279
280       mutable compact_table : bool ;
281
282       mutable copy_parent : bool ;
283
284       mutable clean_when_copying : bool ;
285
286       mutable retry_count : int ;
287
288       mutable bucket_small_size : int ;
289        }
290
291
292
293
294
295       val params : params
296
297
298
299
300
301   Statistics
302       type stats = {
303        classes : int ;
304        methods : int ;
305        inst_vars : int ;
306        }
307
308
309
310
311
312       val stats : unit -> stats
313
314
315
316
317
318
319OCamldoc                          2022-07-22                 CamlinternalOO(3)
Impressum