Expand description
Take an AST and transform it into bytecode
Inspirational code: https://github.com/python/cpython/blob/main/Python/compile.c https://github.com/micropython/micropython/blob/master/py/compile.c
Structs§
- Codegen
Output - Unoptimized instruction sequence and the metadata needed by optimize_cfg.
- Compile
Opts - FBlock
Info - Pattern
Context - The pattern context holds information about captured names and jump targets.
Enums§
- FBlock
Datum - Stores additional data for fblock unwinding
- FBlock
Type - Future
Feature - A Python
__future__feature flag imported viafrom __future__ import <feature>.
Functions§
- compile_
block_ expression - compile_
codegen - compile.c _PyCompile_CodeGen
- compile_
expression - compile_
program - Compile a standard Python program to bytecode
- compile_
program_ single - Compile a Python program to bytecode for the context of a REPL
- compile_
top - Compile an Mod produced from ruff parser
- compile_
top_ with_ syntax_ warning_ handler - ruff_
int_ to_ bigint