Expand description
WASM Binary Decoder - Converts wasmparser operators to WasmOp sequences
This module bridges the gap between parsed WASM binaries and any backend. It extracts function bodies and converts wasmparser operators to our internal WasmOp format.
Structs§
- Call
Indirect Guards - #642/#650: everything the
call_indirectlowering needs to emit its guards — computed once per module byDecodedModule::call_indirect_guardsand threaded to the instruction selector viaCompileConfig. - Decoded
Module - Decoded WASM module with functions and memory
- Elem
Segment Info - #642: one element segment’s statically-decoded shape — see
DecodedModule::elem_segments. - Function
Ops - Decoded function with its WasmOp sequence
- Import
Entry - A WASM import entry with full metadata
- Table
Guards - #642/#650: one table’s
call_indirectguard inputs — seeCallIndirectGuardsfor the layout contract and soundness argument. - Wasm
Global - A WASM global’s declaration — its initial value and mutability (#237).
Needed so the native-pointer ABI can recognize a global whose initializer is
a linear-memory address (e.g.
$__stack_pointer = 65536) and make it__synth_wasm_data-relative, rather than reading it from an R9 globals table the self-contained drop-in object can’t rely on. - Wasm
Memory - WASM linear memory specification
Enums§
- Global
Init - A captured constant global initializer (#649). Only INTEGER
t.constinit exprs are captured:f32.const/f64.constinits deliberately decode toNone— float-typed global ACCESS is the GI-FPU-001 (#369) loud-skip lane, and fabricating a bit-pattern here must not quietly unskip it. Non-const init exprs (e.g.global.getof an import) are not statically known and also decode toNone. - Import
Kind - Kind of a WASM import
Functions§
- decode_
wasm_ functions - Decode a WASM binary and extract all function bodies as WasmOp sequences
- decode_
wasm_ module - Decode a WASM binary and extract functions, memory, and data segments