pub struct CompileResult {
pub native_code: Vec<u8>,
pub dispatch_entries: Vec<(u32, i32)>,
pub trap_table: Vec<(u32, u32, u32)>,
pub exit_label_offset: u32,
pub panic_offset: u32,
}Expand description
Result of compilation.
Fields§
§native_code: Vec<u8>§dispatch_entries: Vec<(u32, i32)>Sparse dispatch entries — (pvm_pc, native_offset) for every
gas-block start. The runtime arena’s dispatch region is
page-zero-filled, so callers only need to write these
non-zero entries instead of materialising a dense
code.len() + 1-sized array.
trap_table: Vec<(u32, u32, u32)>Per-mem-op trap entries (native_offset, pvm_pc, access_width),
sorted by native_offset. The #PF handler binary-searches this by
the faulting RIP’s native offset to recover the PVM PC (for the
PageFault exit / OOG resume) and the access width (for the
category-#3 straddle page-set, so both engines materialize the
same pages via mat::access_pages).
exit_label_offset: u32§panic_offset: u32Native offset of the panic stub. The runtime dense-fills the
dispatch table with this so a jalr to any non-block-start
offset lands on the panic stub via the table — folding the
block-start validation into the dispatch lookup (no separate
bb_starts set). The RV path always populates this.