KrkCodeObject Struct Reference
Code object. More...
#include <object.h>
Inheritance diagram for KrkCodeObject:

Public Member Functions | |
KrkCodeObject * | krk_newCodeObject (void) |
Create a new, uninitialized code object. More... | |
Data Fields | |
unsigned short | requiredArgs |
Arity of required (non-default) arguments. | |
unsigned short | keywordArgs |
Arity of keyword (default) arguments. | |
unsigned short | potentialPositionals |
Precalculated positional arguments for complex argument processing. | |
unsigned short | totalArguments |
Total argument cells we can fill in complex argument processing. | |
size_t | upvalueCount |
Number of upvalues this function collects as a closure. | |
KrkChunk | chunk |
Bytecode data. | |
KrkString * | name |
Name of the function. | |
KrkString * | docstring |
Docstring attached to the function. | |
KrkValueArray | positionalArgNames |
Array of names for positional arguments (and *args) | |
KrkValueArray | keywordArgNames |
Array of names for keyword-only arguments (and **kwargs) | |
size_t | localNameCapacity |
Capacity of localNames. | |
size_t | localNameCount |
Number of entries in localNames. | |
KrkLocalEntry * | localNames |
Stores the names of local variables used in the function, for debugging. | |
KrkString * | qualname |
The dotted name of the function. | |
![]() | |
uint16_t | type |
Tag indicating core type. | |
uint16_t | flags |
General object flags, mostly related to garbage collection. | |
uint32_t | hash |
Cached hash value for table keys. | |
struct KrkObj * | next |
Invasive linked list of all objects in the VM. | |
Protected Attributes | |
KrkObj | obj |
Base. | |
Detailed Description
Code object.
Contains the static data associated with a chunk of bytecode.
Member Function Documentation
◆ krk_newCodeObject()
KrkCodeObject * krk_newCodeObject | ( | void | ) |
The documentation for this struct was generated from the following file:
- src/kuroko/object.h