CamlinternalOO(3) OCaml library CamlinternalOO(3)

# [NAME](#NAME)

CamlinternalOO - Run-time support for objects and classes.

# [Module](#Module)

Module CamlinternalOO

# [Documentation](#Documentation)

Module **CamlinternalOO**  
: **sig end**

Run-time support for objects and classes. All functions in this module are for system use only, not for the casual user.

## [Classes](#Classes)

*type tag*

*type label*

*type table*

*type meth*

*type t*

*type obj*

*type closure*

*val public\_method\_label* : **string -&gt; tag**

*val new\_method* : **table -&gt; label**

*val new\_variable* : **table -&gt; string -&gt; int**

*val new\_methods\_variables* : **table -&gt;** **string array -&gt; string array -&gt; label array**

*val get\_variable* : **table -&gt; string -&gt; int**

*val get\_variables* : **table -&gt; string array -&gt; int array**

*val get\_method\_label* : **table -&gt; string -&gt; label**

*val get\_method\_labels* : **table -&gt; string array -&gt; label array**

*val get\_method* : **table -&gt; label -&gt; meth**

*val set\_method* : **table -&gt; label -&gt; meth -&gt; unit**

*val set\_methods* : **table -&gt; label array -&gt; unit**

*val narrow* : **table -&gt; string array -&gt; string array -&gt; string array -&gt; unit**

*val widen* : **table -&gt; unit**

*val add\_initializer* : **table -&gt; (obj -&gt; unit) -&gt; unit**

*val dummy\_table* : **table**

*val create\_table* : **string array -&gt; table**

*val init\_class* : **table -&gt; unit**

*val inherits* : **table -&gt;** **string array -&gt;** **string array -&gt;** **string array -&gt;** **t \*** **(table -&gt; obj -&gt; Obj.t) \*** **obj -&gt; bool -&gt; Obj.t array**

*val make\_class* : **string array -&gt;** **(table -&gt; Obj.t -&gt; t) -&gt;** **t \*** **(table -&gt; Obj.t -&gt; t) * Obj.t**

*type init\_table*

*val make\_class\_store* : **string array -&gt;** **(table -&gt; t) -&gt;** **init\_table -&gt; unit**

*val dummy\_class* : **string * int * int -&gt;** **t \*** **(table -&gt; Obj.t -&gt; t) * Obj.t**

## [Objects](#Objects)

*val copy* : **(&lt; .. &gt; as 'a) -&gt; 'a**

*val create\_object* : **table -&gt; obj**

*val create\_object\_opt* : **obj -&gt; table -&gt; obj**

*val run\_initializers* : **obj -&gt; table -&gt; unit**

*val run\_initializers\_opt* : **obj -&gt;** **obj -&gt; table -&gt; obj**

*val create\_object\_and\_run\_initializers* : **obj -&gt; table -&gt; obj**

*val send* : **obj -&gt; tag -&gt; t**

*val sendcache* : **obj -&gt;** **tag -&gt; t -&gt; int -&gt; t**

*val sendself* : **obj -&gt; label -&gt; t**

*val get\_public\_method* : **obj -&gt; tag -&gt; closure**

## [Table cache](#Table_cache)

*type tables*

*val lookup\_tables* : **tables -&gt;** **closure array -&gt; tables**

## [Builtins to reduce code size](#Builtins_to_reduce_code_size)

*type impl* =  
| GetConst  
| GetVar  
| GetEnv  
| GetMeth  
| SetVar  
| AppConst  
| AppVar  
| AppEnv  
| AppMeth  
| AppConstConst  
| AppConstVar  
| AppConstEnv  
| AppConstMeth  
| AppVarConst  
| AppEnvConst  
| AppMethConst  
| MethAppConst  
| MethAppVar  
| MethAppEnv  
| MethAppMeth  
| SendConst  
| SendVar  
| SendEnv  
| SendMeth  
| Closure **of** **closure**

## [Parameters](#Parameters)

*type params* = {

**mutable** compact\_table : **bool** ;

**mutable** copy\_parent : **bool** ;

**mutable** clean\_when\_copying : **bool** ;

**mutable** retry\_count : **int** ;

**mutable** bucket\_small\_size : **int** ;  
}

*val params* : **params**

## [Statistics](#Statistics)

*type stats* = {  
classes : **int** ;  
methods : **int** ;  
inst\_vars : **int** ;  
}

*val stats* : **unit -&gt; stats**

2026-09-04 OCamldoc

---

Document: CamlinternalOO(3o) from ocaml 5.5.1-r0 (Chainguard OS)
Source: https://github.com/ocaml/ocaml
