uproot_custom.detree.compiler package¶
Submodules¶
uproot_custom.detree.compiler.frontend module¶
- uproot_custom.detree.compiler.frontend.compile_reader(reader)[source]¶
Compile a whole reader tree; return (module bytes, signature).
- Parameters:
reader – the root of the detree reader tree.
- Returns:
The canonical module bytes and the structural signature they were built from.
- uproot_custom.detree.compiler.frontend.describe_reader(reader: Reader, path: str = 'root')[source]¶
A structural signature: class, constants, buffers and children.
Fields are walked in declaration order, so the signature does not depend on how a constructor happened to assign attributes. A state is described by its declared default – what the module seeds the slot with – so the signature of a reader tree is the same before and after a run, and a reader reused across baskets stays one cache entry.
uproot_custom.detree.compiler.ir_builder module¶
IR builder used by the reader frontend.
The reader frontend historically emitted the legacy 20-byte instruction stream directly. It now emits detree-vm’s typed IR instead; this builder keeps the small, expression-oriented surface the emitter was written against while all control flow is structured (there are no labels or jumps).
Optimization does not happen here: detree.compile runs the detree-vm optimizer and lowering after the frontend has produced the IR.
- class uproot_custom.detree.compiler.ir_builder.IRFunctionBuilder(function: Function, program: Program)[source]¶
Bases:
objectBuild one detree-vm IR function with an emitter-friendly API.