ChunkRecorder Struct Reference

Bytecode emitter backtracking breadcrumb. More...

Data Fields

size_t count
 Offset into the bytecode.
 
size_t lines
 Offset into the line map.
 
size_t constants
 Number of constants in the constants table.
 
size_t expressions
 Number of expression mapping entries.
 

Detailed Description

Bytecode emitter backtracking breadcrumb.

Records the state of the bytecode emitter so it may be rewound when an expression needs to be re-parsed. Allows us to implement backtracking to compile the inner expression of a comprehension, the left hand side of a ternary, or the targets list of a complex assignment.

We rewind the bytecode, line mapping, and constants table, so that we don't keep around duplicate constants or debug info.

Definition at line 258 of file compiler.c.


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