Trait Driver

Source
pub trait Driver {
    type Error: Error + 'static;

Show 14 methods // Provided methods fn on_ast(&mut self, _program: &Program) -> Result<(), Self::Error> { ... } fn on_expanded_ast(&mut self, _program: &Program) -> Result<(), Self::Error> { ... } fn on_hir(&mut self, _program: &HirProgram) -> Result<(), Self::Error> { ... } fn on_hir_origins( &mut self, _origins: &HirOriginTable, ) -> Result<(), Self::Error> { ... } fn on_checked( &mut self, _program: &CheckedProgram, ) -> Result<(), Self::Error> { ... } fn on_mir(&mut self, _program: &MirProgram) -> Result<(), Self::Error> { ... } fn on_mir_origins( &mut self, _origins: &MirOriginTable, ) -> Result<(), Self::Error> { ... } fn on_pass_snapshot( &mut self, _snapshot: &PassSnapshot, ) -> Result<(), Self::Error> { ... } fn on_rust(&mut self, _source: &str) -> Result<(), Self::Error> { ... } fn on_wat(&mut self, _source: &str) -> Result<(), Self::Error> { ... } fn on_wasm(&mut self, _bytes: &[u8]) -> Result<(), Self::Error> { ... } fn on_wasm_diagnostics( &mut self, _diagnostics: &[WasmDiagnostic], ) -> Result<(), Self::Error> { ... } fn on_pass_timings( &mut self, _timings: &[PassTiming], ) -> Result<(), Self::Error> { ... } fn on_provenance_summary( &mut self, _summary: ProvenanceSummary, ) -> Result<(), Self::Error> { ... }
}
Expand description

Hook interface for observing compiler pipeline outputs.

Required Associated Types§

Source

type Error: Error + 'static

Error type returned by hook implementations.

Provided Methods§

Source

fn on_ast(&mut self, _program: &Program) -> Result<(), Self::Error>

Observe the parsed AST before meta expansion.

Source

fn on_expanded_ast(&mut self, _program: &Program) -> Result<(), Self::Error>

Observe the AST after meta expansion and elaboration.

Source

fn on_hir(&mut self, _program: &HirProgram) -> Result<(), Self::Error>

Observe lowered HIR.

Source

fn on_hir_origins( &mut self, _origins: &HirOriginTable, ) -> Result<(), Self::Error>

Observe side-table provenance ids keyed by HIR expression ids.

Source

fn on_checked(&mut self, _program: &CheckedProgram) -> Result<(), Self::Error>

Observe semantic checker annotations.

Source

fn on_mir(&mut self, _program: &MirProgram) -> Result<(), Self::Error>

Observe lowered MIR.

Source

fn on_mir_origins( &mut self, _origins: &MirOriginTable, ) -> Result<(), Self::Error>

Observe side-table provenance ids keyed by MIR function/local ids.

Source

fn on_pass_snapshot( &mut self, _snapshot: &PassSnapshot, ) -> Result<(), Self::Error>

Observe one pass snapshot emitted by the pipeline.

Source

fn on_rust(&mut self, _source: &str) -> Result<(), Self::Error>

Observe emitted Rust source.

Source

fn on_wat(&mut self, _source: &str) -> Result<(), Self::Error>

Observe emitted WAT source.

Source

fn on_wasm(&mut self, _bytes: &[u8]) -> Result<(), Self::Error>

Observe emitted WASM bytes when available.

Source

fn on_wasm_diagnostics( &mut self, _diagnostics: &[WasmDiagnostic], ) -> Result<(), Self::Error>

Observe non-fatal diagnostics from WASM emission.

Source

fn on_pass_timings( &mut self, _timings: &[PassTiming], ) -> Result<(), Self::Error>

Observe per-pass timing information.

Source

fn on_provenance_summary( &mut self, _summary: ProvenanceSummary, ) -> Result<(), Self::Error>

Observe aggregate provenance counters for one compile run.

Implementors§