AST → vyper/codegen_venom/ → Venom IR → optimization passes → assembly → bytecode.
Translates annotated Vyper AST directly to Venom SSA IR.
module.py— entry point, module-level codegenexpr.py— expression translationstmt.py— statement translationarithmetic.py— numeric operationsbuiltins/— built-in function codegenabi/— ABI encoding/decodingcontext.py— codegen context (variable tracking, etc.)
After Venom IR is constructed, vyper/venom/ runs optimization passes then
venom/venom_to_assembly.py emits EVM assembly. The assembler in vyper/evm/assembler/
produces final bytecode.
AST → vyper/codegen/ → s-expression IR (IRnode) → vyper/ir/compile_ir.py → assembly → bytecode.
This is the current default. See vyper/ir/README.md for IR grammar and structure.
Key difference: legacy IR is tree-shaped s-expressions, Venom is SSA basic blocks.