pub struct CompiledFunction {
pub name: String,
pub code: Vec<u8>,
pub wasm_ops: Vec<WasmOp>,
pub relocations: Vec<CodeRelocation>,
pub line_map: LineMap,
pub branch_map: BranchMap,
pub wcet: Option<WcetFunction>,
pub wcet_intermediate: Option<WcetIntermediate>,
}Expand description
A single compiled function
Fields§
§name: StringFunction name (from WASM export or generated)
code: Vec<u8>Raw machine code bytes
wasm_ops: Vec<WasmOp>Original WASM ops (retained for verification)
relocations: Vec<CodeRelocation>Relocations for external symbol references (BL to bridge functions)
line_map: LineMapVCR-DBG-001: per-instruction source map for DWARF .debug_line emission —
(machine_offset_within_code, wasm_op_index) captured at encode time, one
entry per emitted machine instruction. A None op-index marks an
instruction with no originating wasm op (prologue/epilogue, literal-pool
word). This is purely additive metadata: it is never serialized unless
.debug_line emission is requested, so the emitted .text is
byte-identical with or without it. Empty for backends/paths that do not
yet produce a source map (RISC-V, the optimized ARM path).
branch_map: BranchMapVCR-DEC-003 (#396): per-instruction object-branch class, parallel to
line_map. Lets the synth-provenance-v1 emitter enumerate the real
object conditional branches (not just re-walk the wasm branch ops).
Purely additive metadata: never serialized into .text, so emitted bytes
are byte-identical with or without it. Empty for backends/paths that do
not produce it (RISC-V, the optimized ARM path).
wcet: Option<WcetFunction>#778 (v0.46): the SOUND static worst-case-cycle bound for this function,
or a loud decline, computed over the final Thumb-2 instruction stream (see
crate::wcet). Some only when the ARM backend produced it (the RISC-V
and AArch64 backends carry no cycle model yet → None). Purely additive
metadata: derived from the already-decided instruction list, never
serialized into .text, so emitted bytes are byte-identical with or
without it (frozen-safe). Emitted as the <output>.wcet.json sidecar only
under --emit-wcet.
wcet_intermediate: Option<WcetIntermediate>#778 phase 3: the per-function WCET INTERMEDIATE (own-body cycles + direct
call sites, or a composition-independent decline) BEFORE inter-procedural
composition. The module driver composes these across the direct call graph
into the final per-function bounds (a caller’s bound = its own body + each
direct callee’s bound × the call site’s proven execution count). Some only
on the Thumb-2 path that produced wcet. Purely additive, .text-invisible
(frozen-safe) — derived from the already-decided instruction list.
Trait Implementations§
Source§impl Clone for CompiledFunction
impl Clone for CompiledFunction
Source§fn clone(&self) -> CompiledFunction
fn clone(&self) -> CompiledFunction
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more