Documentation
irx.builder.state
irx.builder.state
Source: packages/irx/src/irx/builder/state.py
title: Shared state typing for llvmlite-based codegen.
Classes
CleanupKind(str, Enum)
title: Distinguish implicit destruction from explicit finalization.
CleanupAction
title: One active cleanup emitter with optional semantic owner identity.
summary: >-
Infallible actions neither install a pending exception nor transfer
control; only audited native free/release operations use that contract.
attributes:
emitter:
type: CleanupEmitter
owner_symbol_id:
type: str | None
kind:
type: CleanupKind
fallible:
type: bool
ExceptionTarget
title: One lexical handler target and the cleanup depth it preserves.
attributes:
block:
type: ir.Block
cleanup_depth:
type: int
LoopTargets
title: Canonical break/continue targets for one active loop.
attributes:
break_target:
type: ir.Block
continue_target:
type: ir.Block
cleanup_depth:
type: int
PendingReturn
title: Owned result and lexical boundaries of a suspended return.
summary: >-
Restore an affine source binding when cancellation stays inside its
scope; otherwise release the abandoned result. Nested candidates remain
independent until an actual return commits.
attributes:
actions:
type: tuple[CleanupEmitter, Ellipsis]
exception_targets:
type: tuple[ExceptionTarget, Ellipsis]
loops:
type: tuple[LoopTargets, Ellipsis]
restore_depth:
type: int | None