pub enum CompileEvent {
Show 21 variants
Parsed {
statements: usize,
},
BindingResolved {
name: String,
node_type: String,
},
ModuleInlined {
name: String,
nodes_added: usize,
},
TypeAdapterInserted {
from_node: String,
to_node: String,
adapter: String,
},
ConstantFolded {
node: String,
value: String,
},
FusionApplied {
pattern: String,
nodes_replaced: usize,
},
OutputDeclared {
name: String,
},
CompileLevelSelected {
node: String,
level: String,
},
ConfigWireCycleWarning {
node: String,
port: String,
},
TypeWidening {
from: &'static str,
to: &'static str,
context: String,
},
ComprehensionWarning {
source: String,
line: usize,
col: usize,
warning: String,
},
Warning {
message: String,
},
ExternWithoutDefault {
name: String,
port_type: String,
},
Summary {
nodes: usize,
outputs: usize,
constants_folded: usize,
},
PragmaAcknowledged {
name: String,
line: usize,
},
UnknownPragma {
name: String,
line: usize,
},
AssertionInserted {
from_node: String,
to_node: String,
kind: String,
},
AssertionSkipped {
from_node: String,
to_node: String,
reason: String,
},
TileHoleTyped {
tile: String,
hole: String,
wire_type: String,
declared: Option<String>,
expectation: String,
encoder: String,
adapter: Option<String>,
},
TileCompiled {
tile: String,
encoding: String,
statics: usize,
static_bytes: usize,
holes: usize,
branches: usize,
projections: usize,
bodies: Vec<String>,
},
InputConverterInserted {
input: String,
to: String,
node: String,
origin: String,
level: EventLevel,
},
}Expand description
A diagnostic event from the Polydat compilation pipeline.
Variants§
Parsed
DSL source parsed into AST.
BindingResolved
A binding was resolved from DSL to a node.
ModuleInlined
A module was loaded and inlined.
TypeAdapterInserted
Type adapter inserted between mismatched ports.
Fields
ConstantFolded
Init-time constant folded (evaluation_model.md, “Compile-Time Constant Folding”).
FusionApplied
Fusion pattern matched and applied (graph_compiler.md §5.2).
Fields
OutputDeclared
Output declared.
CompileLevelSelected
Compilation level selected for a node.
ConfigWireCycleWarning
Config wire connected to a cycle-time source (performance warning).
TypeWidening
Auto-widening type coercion inserted by the compiler.
Fields
ComprehensionWarning
A degenerate composition the comprehension validator warns about (comprehension_forms.md §5.8): the comprehension compiles and runs; a strict compile refuses it instead.
Fields
Warning
Warning during compilation.
ExternWithoutDefault
An extern with no default: None until the host sets it, and
every consumer reads None through it (engines.md §3.3).
Summary
Summary of the compiled program.
Fields
PragmaAcknowledged
A module-level pragma was acknowledged. Recorded once per
recognised // @pragma: <name> directive at the top of the
source. Lets the binary’s --stats and explain show which
graph transforms the module asked for.
UnknownPragma
An unrecognised module-level pragma was seen. Pragmas are forward-compatible: an old binary parses a newer module that opts into features it doesn’t support, and the only effect is this advisory.
AssertionInserted
Strict-wire mode auto-inserted an assertion node between
from_node and to_node (graph_compiler.md §2).
Fields
AssertionSkipped
Strict-wire mode considered inserting an assertion but proved it redundant. The reason field names which skip rule applied (constant source, upstream assertion, etc.).
Fields
TileHoleTyped
A tile hole was typed (polytile.md §4): its expression, the wire type the compiler inferred, the declared type if any, the contextual expectation of its position, the encoder chosen, and the adapter inserted between wire and declared type if one was.
Fields
TileCompiled
A tile’s skeleton (polytile.md §6, §10): how many static runs it copies and their byte total, its holes, branches, and projections, and the source of each projection body program.
Fields
InputConverterInserted
A converter node was placed in front of an input whose type may vary (input_variance.md §4): the input’s slot takes any value, and this node converts it to the type its consumers read.
Fields
origin: StringWhy the input’s type may vary: inferred for an input whose
type the compiler inferred, opened by input_variance, or
declared dyn for one the program declares dyn.
level: EventLevelThe level CompileOptions::input_variance asked for.
Implementations§
Source§impl CompileEvent
impl CompileEvent
Sourcepub fn level(&self) -> EventLevel
pub fn level(&self) -> EventLevel
The severity level of this event.
Trait Implementations§
Source§impl Clone for CompileEvent
impl Clone for CompileEvent
Auto Trait Implementations§
impl Freeze for CompileEvent
impl RefUnwindSafe for CompileEvent
impl Send for CompileEvent
impl Sync for CompileEvent
impl Unpin for CompileEvent
impl UnsafeUnpin for CompileEvent
impl UnwindSafe for CompileEvent
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more