Compiler Struct Reference

Subcompiler state. More...

Data Fields

struct Compilerenclosing
 Enclosing function compiler, or NULL for a module.
 Bytecode emitter.
FunctionType type
 Type of function being compiled.
size_t scopeDepth
 Depth of nested scope blocks.
size_t localCount
 Total number of local variables.
size_t localsSpace
 Space in the locals array.
 Array of local variable references.
size_t upvaluesSpace
 Space in the upvalues array.
 Array of upvalue references. Count is stored in the codeobject.
size_t loopLocalCount
 Tracks how many locals to pop off the stack when exiting a loop.
size_t breakCount
 Number of break statements.
size_t breakSpace
 Space in breaks array.
struct LoopExitbreaks
 Array of loop exit instruction indices for break statements.
size_t continueCount
 Number of continue statements.
size_t continueSpace
 Space in continues array.
struct LoopExitcontinues
 Array of loop exit instruction indices for continue statements.
size_t localNameCapacity
 How much space is available in the codeobject's local names table.
struct IndexWithNextproperties
 Linked list of class property constant indices.
struct Compilerenclosed
 Subcompiler we are enclosing, need for type annotation compilation.
size_t annotationCount
 Number of type annotations found while compiling function signature.
int delSatisfied
 Flag indicating if a 'del' target has been completed.
size_t optionsFlags
 Special options imports; similar to future in Python.
int unnamedArgs
 Number of positional arguments that will not be assignable through keywords.

Detailed Description

Subcompiler state.

Each function is compiled in its own context, with its own codeobject, locals, type, scopes, etc.

Definition at line 199 of file compiler.c.

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