SUMMARY: MODULE | CLASS | TYPE | PROC | VAR | CONST | DETAIL: TYPE | PROC | VAR | CONST |
Proxy module for the run-time system. This module is used to pull in the executable code of the run-time system, and to mark the place of the run-time system's header files. This module's directory is added to the include path of the C compiler, so that `__oo2c.h', `__typemap.h', and so on, are picked up from here.
The compiler implicitly adds an import for this module to every module. A program may import this module directly, for example to gain access to meta data embedded by the compiler into a module's object file. Please note that this module should be considered a part of the compiler, not of the standard library. As such, it may differ across different compiler implementations, and for a given compiler its interface might change without prior notice.
Note: The math library `libm' is always linked in for the sake of the predefined function ENTIER.
Class List | |
Module | |
Struct |
Class Summary: Module [Detail] | |
+--RT0.Module | |
Field Summary | |
name-: Name Name of the module. | |
typeDescriptors-: POINTER TO ARRAY OF Struct All type descriptors of this module that correspond to named types defined on the top level. | |
Constructor Summary | |
ThisModule(ARRAY OF CHAR): Module Returns the module descriptor for the module name. |
Class Summary: Struct [Detail] | |
+--RT0.Struct | |
Field Summary | |
baseTypes-: POINTER TO ARRAY OF Struct Array element type, pointer base type, or list of record base types. | |
form-: SHORTINT Identifies which kind of type constructor variant is used. | |
len-: LONGINT Holds the length of an array, the number of open dimensions of an open array, or the extension level of a record. | |
module-: Module The module that defines this type descriptor. | |
name-: Name Type name. | |
size-: LONGINT Size of the data type in bytes. | |
tbProcs-: POINTER TO ARRAY OF PTR Table of type-bound procedures of a record type. | |
Constructor Summary | |
ThisType(Module, ARRAY OF CHAR): Struct Returns the type descriptor for the type name of module mid. | |
TypeOf(PTR): Struct Returns the type of the record pointer ptr. |
Type Summary | |
Name = POINTER TO ARRAY OF CHAR |
Procedure Summary | |
CollectGarbage() Explicitly trigger a full, world-stop garbage collection. | |
ErrorAssertionFailed(Module, LONGINT, LONGINT) | |
ErrorDerefOfNil(Module, LONGINT) | |
ErrorFailedCase(Module, LONGINT, LONGINT) | |
ErrorFailedFunction(Module, LONGINT) | |
ErrorFailedTypeAssert(Module, LONGINT) | |
ErrorFailedTypeGuard(Module, LONGINT, Struct) | |
ErrorFailedWith(Module, LONGINT, Struct) | |
ErrorIndexOutOfRange(Module, LONGINT, LONGINT, LONGINT) | |
FreeBlock(PTR) Frees a block of memory allocated with NewBlock. | |
GetEnv(ARRAY OF CHAR, VAR ARRAY OF CHAR): BOOLEAN If an environment variable name exists, copy its value into value and return TRUE. | |
Halt(LONGINT) | |
NewBlock(LONGINT): PTR Allocates a memory block on the heap with a size of at least bytes bytes. | |
NewObject(Struct): PTR Allocates a new array or record variable on the heap, using the type descriptor td. | |
RegisterModule(Module) Registers the module descriptor with the run-time system. |
Variable Summary | |
argc-: LONGINT | |
argv-: POINTER TO ARRAY OF POINTER TO ARRAY OF CHAR | |
boolean-: StructDesc | |
byte-: StructDesc | |
char-: StructDesc | |
integer-: StructDesc | |
longchar-: StructDesc | |
longint-: StructDesc | |
longreal-: StructDesc | |
poisonHeap: LONGINT If set to a non-negative value, then memory allocated through NewObject and NewBlock is filled with this byte value. | |
ptr-: StructDesc | |
real-: StructDesc | |
set32-: StructDesc | |
shortint-: StructDesc | |
ucs4char-: StructDesc |
Constant Summary | |
strArray An array definition with a fixed length, as in `ARRAY 123 OF CHAR'. | |
strBoolean | |
strByte | |
strChar | |
strInteger | |
strLongchar | |
strLongint | |
strLongreal | |
strOpenArray An array definition with an unspecified length, as in `ARRAY OF CHAR'. | |
strPointer A pointer definition of the form `POINTER TO T'. | |
strPtr | |
strReal | |
strRecord A record, either in its C struct or union variant. | |
strSet32 | |
strShortint | |
strUCS4Char |
Class Detail: Module |
Field Detail |
FIELD name-: Name
Name of the module.
FIELD typeDescriptors-: POINTER TO ARRAY OF Struct
All type descriptors of this module that correspond to named types defined on the top level. Descriptors are listed in no particular order. The last element of the array has the value NIL.
Constructor Detail |
PROCEDURE ThisModule(name: ARRAY OF CHAR): Module
Returns the module descriptor for the module name. Result is NIL if no module of this name has been registered.
Class Detail: Struct |
Field Detail |
FIELD baseTypes-: POINTER TO ARRAY OF Struct
Array element type, pointer base type, or list of record base types. For predefined scalar types this field is NIL.
FIELD form-: SHORTINT
Identifies which kind of type constructor variant is used.
FIELD len-: LONGINT
Holds the length of an array, the number of open dimensions of an open array, or the extension level of a record.
FIELD module-: Module
The module that defines this type descriptor. For predefined types, this is a reference to module `RT0'.
FIELD name-: Name
Type name. NIL for anonymous types.
FIELD size-: LONGINT
Size of the data type in bytes. For an open array type, which has no static size of its own, this field is size of the first element type that is not an open array.
FIELD tbProcs-: POINTER TO ARRAY OF PTR
Table of type-bound procedures of a record type. This field is NIL for all other types.
Constructor Detail |
PROCEDURE ThisType(mid: Module; name: ARRAY OF CHAR): Struct
Returns the type descriptor for the type name of module mid. Result is NIL if there is not such type descriptor.
PROCEDURE TypeOf(ptr: PTR): Struct
Returns the type of the record pointer ptr. The address ptr must be a previous result of NewObject. Result is undefined if ptr is not a reference to a record object.
Type Detail |
TYPE Name = POINTER TO ARRAY OF CHAR
Procedure Detail |
PROCEDURE CollectGarbage()
Explicitly trigger a full, world-stop garbage collection.
PROCEDURE ErrorAssertionFailed(mid: Module; pos: LONGINT; code: LONGINT)
PROCEDURE ErrorDerefOfNil(mid: Module; pos: LONGINT)
PROCEDURE ErrorFailedCase(mid: Module; pos: LONGINT; select: LONGINT)
PROCEDURE ErrorFailedFunction(mid: Module; pos: LONGINT)
PROCEDURE ErrorFailedTypeAssert(mid: Module; pos: LONGINT)
PROCEDURE ErrorFailedTypeGuard(mid: Module; pos: LONGINT; typeTag: Struct)
PROCEDURE ErrorFailedWith(mid: Module; pos: LONGINT; typeTag: Struct)
PROCEDURE ErrorIndexOutOfRange(mid: Module; pos: LONGINT; index: LONGINT; length: LONGINT)
PROCEDURE FreeBlock(ptr: PTR)
Frees a block of memory allocated with NewBlock.
PROCEDURE GetEnv(name: ARRAY OF CHAR; VAR value: ARRAY OF CHAR): BOOLEAN
If an environment variable name exists, copy its value into value and return TRUE. Otherwise, return FALSE.
PROCEDURE Halt(code: LONGINT)
PROCEDURE NewBlock(bytes: LONGINT): PTR
Allocates a memory block on the heap with a size of at least bytes bytes. Pointers in the allocated block are ignored during garbage collection. That is, the block must not contain any references to objects on the heap that are not kept live by other pointers.
PROCEDURE NewObject(td: Struct): PTR
Allocates a new array or record variable on the heap, using the type descriptor td. For an open array object, the lengths of the array's dimensions are passed as second, third, and so on, parameter. They must be of type LONGINT.
PROCEDURE RegisterModule(mid: Module)
Registers the module descriptor with the run-time system.
Variable Detail |
VAR argc-: LONGINT
VAR argv-: POINTER TO ARRAY OF POINTER TO ARRAY OF CHAR
VAR boolean-: StructDesc
VAR byte-: StructDesc
VAR char-: StructDesc
VAR integer-: StructDesc
VAR longchar-: StructDesc
VAR longint-: StructDesc
VAR longreal-: StructDesc
VAR poisonHeap: LONGINT
If set to a non-negative value, then memory allocated through NewObject and NewBlock is filled with this byte value. Otherwise, the memory is left as provided by the used libc or libgc library. This is the default.
VAR ptr-: StructDesc
VAR real-: StructDesc
VAR set32-: StructDesc
VAR shortint-: StructDesc
VAR ucs4char-: StructDesc
Constant Detail |
CONST strArray
An array definition with a fixed length, as in `ARRAY 123 OF CHAR'.
CONST strBoolean
CONST strByte
CONST strChar
CONST strInteger
CONST strLongchar
CONST strLongint
CONST strLongreal
CONST strOpenArray
An array definition with an unspecified length, as in `ARRAY OF CHAR'.
CONST strPointer
A pointer definition of the form `POINTER TO T'.
CONST strPtr
CONST strReal
CONST strRecord
A record, either in its C struct or union variant.
CONST strSet32
CONST strShortint
CONST strUCS4Char