---
name: "CamlinternalOO"
section: "3o"
platform: "linux"
package: "ocaml"
version: "5.5.0-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/CamlinternalOO"
---

# CamlinternalOO(3o)

Run-time support for objects and classes.

## NAME

CamlinternalOO - Run-time support for objects and classes.

## Module

Module   CamlinternalOO

## 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

*type tag*

*type label*

*type table*

*type meth*

*type t*

*type obj*

*type closure*

*val public\_method\_label* :  **string -\> tag**

*val new\_method* :  **table -\> label**

*val new\_variable* :  **table -\> string -\> int**

*val new\_methods\_variables* :  **table -\>** **string array -\> string array -\> label array**

*val get\_variable* :  **table -\> string -\> int**

*val get\_variables* :  **table -\> string array -\> int array**

*val get\_method\_label* :  **table -\> string -\> label**

*val get\_method\_labels* :  **table -\> string array -\> label array**

*val get\_method* :  **table -\> label -\> meth**

*val set\_method* :  **table -\> label -\> meth -\> unit**

*val set\_methods* :  **table -\> label array -\> unit**

*val narrow* :  **table -\> string array -\> string array -\> string array -\> unit**

*val widen* :  **table -\> unit**

*val add\_initializer* :  **table -\> (obj -\> unit) -\> unit**

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

*val create\_table* :  **string array -\> table**

*val init\_class* :  **table -\> unit**

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

*val make\_class* :  **string array -\>** **(table -\> Obj.t -\> t) -\>** **t \*** **(table -\> Obj.t -\> t) \* Obj.t**

*type init\_table*

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

*val dummy\_class* :  **string \* int \* int -\>** **t \*** **(table -\> Obj.t -\> t) \* Obj.t**

### Objects

*val copy* :  **(\< .. \> as 'a) -\> 'a**

*val create\_object* :  **table -\> obj**

*val create\_object\_opt* :  **obj -\> table -\> obj**

*val run\_initializers* :  **obj -\> table -\> unit**

*val run\_initializers\_opt* :  **obj -\>** **obj -\> table -\> obj**

*val create\_object\_and\_run\_initializers* :  **obj -\> table -\> obj**

*val send* :  **obj -\> tag -\> t**

*val sendcache* :  **obj -\>** **tag -\> t -\> int -\> t**

*val sendself* :  **obj -\> label -\> t**

*val get\_public\_method* :  **obj -\> tag -\> closure**

### Table cache

*type tables*

*val lookup\_tables* :  **tables -\>** **closure array -\> tables**

### 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

*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

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

*val stats* :  **unit -\> stats**
