Expand description
High-level Intermediate Representation (HIR) for Joule
HIR is a typed, desugared representation of the AST. It includes:
- Resolved types for all expressions
- Resolved names (symbols point to definitions)
- Desugared syntax (no syntactic sugar)
- Type annotations on all nodes
- Energy budget metadata from
#[energy_budget(...)]attributes
Re-exports§
pub use energy::EnergyMetadata;pub use energy::EnergyViolation;pub use energy::EnergyViolationKind;pub use energy::HirEnergyBudget;
Modules§
- energy
- HIR-level energy budget representation
Structs§
- Block
- Block expression
- Capture
- Captured variable from enclosing scope
- Const
- Const declaration
- Effect
Def - Algebraic effect definition in HIR
- Effect
OpDef - A single operation within an effect definition
- Energy
Budget Constraint - Energy budget constraint for block-level energy checking
- Enum
- Enum definition
- Expr
- Expression (with explicit types)
- Field
- Struct field
- Field
Init - Field initialization
- Field
Pattern - Function
- Function definition (with resolved types)
- Function
Attributes - Parsed function attributes for code generation decisions
- Hir
- A complete HIR module (file)
- HirEffect
Handler - An effect handler clause in the HIR
- HirId
- Unique identifier for HIR nodes
- HirSelect
Arm - Select arm for channel selection
- HirSupervisor
Child - Supervisor child specification in HIR
- HirThermal
Arm - Thermal adaptation arm
- Impl
- Impl block
- InferTy
- Type variable for type inference
- Match
Arm - Match arm
- Param
- Function parameter
- Static
- Static declaration
- Struct
- Struct definition
- Supervisor
Def - Supervisor tree definition in HIR
- Trait
- Trait definition
- Trait
Function - Variant
- Enum variant
Enums§
- BinOp
- Binary operators
- Expr
Kind - FloatTy
- HirChild
Restart - Child restart policy in HIR
- HirIndex
Component - A single component of a multi-dimensional index in HIR.
- HirSelect
Operation - Channel operation in a select arm
- HirSupervisor
Strategy - Supervisor strategy in HIR
- Impl
Item - Inline
Hint - Inline hints for the compiler
- IntTy
- Item
- Top-level items
- LitValue
- Literal value for pattern matching
- Literal
- Literal values
- Pattern
- Pattern (simplified from AST)
- Processor
Target - Target processor for heterogeneous compilation
- Statement
- Statement
- Trait
Item - Ty
- Type representation in HIR
- UintTy
- UnOp
- Unary operators
- Variant
Fields