BaseClasses Struct Reference

Table of classes for built-in object types. More...

#include <vm.h>

Data Fields

KrkClassobjectClass
 
KrkClassmoduleClass
 
KrkClasstypeClass
 
KrkClassintClass
 
KrkClassfloatClass
 
KrkClassboolClass
 
KrkClassnoneTypeClass
 
KrkClassstrClass
 
KrkClassfunctionClass
 
KrkClassmethodClass
 
KrkClasstupleClass
 
KrkClassbytesClass
 
KrkClasslistiteratorClass
 
KrkClassrangeClass
 
KrkClassrangeiteratorClass
 
KrkClassstriteratorClass
 
KrkClasstupleiteratorClass
 
KrkClasslistClass
 
KrkClassdictClass
 
KrkClassdictitemsClass
 
KrkClassdictkeysClass
 
KrkClassbytesiteratorClass
 
KrkClasspropertyClass
 
KrkClasscodeobjectClass
 
KrkClassgeneratorClass
 
KrkClassnotImplClass
 
KrkClassbytearrayClass
 
KrkClassdictvaluesClass
 
KrkClasssliceClass
 
KrkClasslongClass
 
KrkClassmapClass
 
KrkClasszipClass
 
KrkClassfilterClass
 
KrkClassenumerateClass
 
KrkClassHelperClass
 
KrkClassLicenseReaderClass
 
KrkClassCompilerStateClass
 
KrkClassCellClass
 
KrkClasssetClass
 
KrkClasssetiteratorClass
 
KrkClassThreadClass
 
KrkClassLockClass
 
KrkClassellipsisClass
 

Detailed Description

Table of classes for built-in object types.

For use by C modules and within the VM, an instance of this struct is attached to the global VM state. At VM initialization, each built-in class is attached to this table, and the class values stored here are used for integrated type checking with krk_isInstanceOf.

Note
As this and other tables are used directly by embedders, do not reorder the layout of the individual class pointers, even if it looks nicer. The ordering here is part of our library ABI.

Definition at line 97 of file vm.h.

Field Documentation

◆ boolClass

KrkClass* BaseClasses::boolClass

Primitive boolean type.

Definition at line 103 of file vm.h.

◆ bytearrayClass

KrkClass* BaseClasses::bytearrayClass

Mutable array of bytes

Definition at line 124 of file vm.h.

◆ bytesClass

KrkClass* BaseClasses::bytesClass

An immutable sequence of bytes.

Definition at line 109 of file vm.h.

◆ bytesiteratorClass

KrkClass* BaseClasses::bytesiteratorClass

Iterator over the integer byte values of a bytes object.

Definition at line 119 of file vm.h.

◆ CellClass

KrkClass* BaseClasses::CellClass

Upvalue cell

Definition at line 135 of file vm.h.

◆ codeobjectClass

KrkClass* BaseClasses::codeobjectClass

Static compiled bytecode container (KrkCodeObject)

Definition at line 121 of file vm.h.

◆ CompilerStateClass

KrkClass* BaseClasses::CompilerStateClass

Compiler global state

Definition at line 134 of file vm.h.

◆ dictClass

KrkClass* BaseClasses::dictClass

Mutable mapping of hashable keys to arbitrary values.

Definition at line 116 of file vm.h.

◆ dictitemsClass

KrkClass* BaseClasses::dictitemsClass

Iterator over the (key,value) pairs of a dict

Definition at line 117 of file vm.h.

◆ dictkeysClass

KrkClass* BaseClasses::dictkeysClass

Iterator over the keys of a dict

Definition at line 118 of file vm.h.

◆ dictvaluesClass

KrkClass* BaseClasses::dictvaluesClass

Iterator over values of a dict

Definition at line 125 of file vm.h.

◆ ellipsisClass

KrkClass* BaseClasses::ellipsisClass

Type of the Ellipsis (...) singleton

Definition at line 140 of file vm.h.

◆ enumerateClass

KrkClass* BaseClasses::enumerateClass

Yield pairs of indexes and values from an iterator.

Definition at line 131 of file vm.h.

◆ filterClass

KrkClass* BaseClasses::filterClass

Yield elements from an iterator for which a function returns a truthy value.

Definition at line 130 of file vm.h.

◆ floatClass

KrkClass* BaseClasses::floatClass

Primitive double-precision floating-point type.

Definition at line 102 of file vm.h.

◆ functionClass

KrkClass* BaseClasses::functionClass

Represents a function object (KrkClosure) or native bind (KrkNative)

Definition at line 106 of file vm.h.

◆ generatorClass

KrkClass* BaseClasses::generatorClass

Generator object.

Definition at line 122 of file vm.h.

◆ HelperClass

KrkClass* BaseClasses::HelperClass

Class implementation of 'help' object

Definition at line 132 of file vm.h.

◆ intClass

KrkClass* BaseClasses::intClass

Primitive integer type.

Definition at line 101 of file vm.h.

◆ LicenseReaderClass

KrkClass* BaseClasses::LicenseReaderClass

Class implementation of 'license' object

Definition at line 133 of file vm.h.

◆ listClass

KrkClass* BaseClasses::listClass

Mutable collection of arbitrary values.

Definition at line 115 of file vm.h.

◆ listiteratorClass

KrkClass* BaseClasses::listiteratorClass

Iterator over lists

Definition at line 110 of file vm.h.

◆ LockClass

KrkClass* BaseClasses::LockClass

Threading.Lock

Definition at line 139 of file vm.h.

◆ longClass

KrkClass* BaseClasses::longClass

Arbitrary precision integer

Definition at line 127 of file vm.h.

◆ mapClass

KrkClass* BaseClasses::mapClass

Apply a function to entries from an iterator.

Definition at line 128 of file vm.h.

◆ methodClass

KrkClass* BaseClasses::methodClass

Represents a bound method (KrkBoundMethod)

Definition at line 107 of file vm.h.

◆ moduleClass

KrkClass* BaseClasses::moduleClass

A class for representing imported modules, both managed and C.

Definition at line 99 of file vm.h.

◆ noneTypeClass

KrkClass* BaseClasses::noneTypeClass

The class of the None value.

Definition at line 104 of file vm.h.

◆ notImplClass

KrkClass* BaseClasses::notImplClass

NotImplementedType

Definition at line 123 of file vm.h.

◆ objectClass

KrkClass* BaseClasses::objectClass

The base of all classes within the type tree.

Definition at line 98 of file vm.h.

◆ propertyClass

KrkClass* BaseClasses::propertyClass

Magic object that calls a function when accessed from an instance through the dot operator.

Definition at line 120 of file vm.h.

◆ rangeClass

KrkClass* BaseClasses::rangeClass

An object representing a start and end point for a sequence of integers.

Definition at line 111 of file vm.h.

◆ rangeiteratorClass

KrkClass* BaseClasses::rangeiteratorClass

Iterator over a range of values

Definition at line 112 of file vm.h.

◆ setClass

KrkClass* BaseClasses::setClass

Unordered hashset

Definition at line 136 of file vm.h.

◆ setiteratorClass

KrkClass* BaseClasses::setiteratorClass

Iterator over values in a set

Definition at line 137 of file vm.h.

◆ sliceClass

KrkClass* BaseClasses::sliceClass

Slice object

Definition at line 126 of file vm.h.

◆ strClass

KrkClass* BaseClasses::strClass

Built-in Unicode string type.

Definition at line 105 of file vm.h.

◆ striteratorClass

KrkClass* BaseClasses::striteratorClass

Iterator over characters (by codepoint) in a string

Definition at line 113 of file vm.h.

◆ ThreadClass

KrkClass* BaseClasses::ThreadClass

Threading.Thread

Definition at line 138 of file vm.h.

◆ tupleClass

KrkClass* BaseClasses::tupleClass

An immutable collection of arbitrary values.

Definition at line 108 of file vm.h.

◆ tupleiteratorClass

KrkClass* BaseClasses::tupleiteratorClass

Iterator over values in a tuple

Definition at line 114 of file vm.h.

◆ typeClass

KrkClass* BaseClasses::typeClass

Classes themselves are of this class.

Definition at line 100 of file vm.h.

◆ zipClass

KrkClass* BaseClasses::zipClass

Yield elements from multiple iterators.

Definition at line 129 of file vm.h.


The documentation for this struct was generated from the following file: