pub struct Compiler {
pub asm: Assembler,
/* private fields */
}Expand description
PVM-to-x86-64 compiler.
Fields§
§asm: AssemblerImplementations§
Source§impl Compiler
impl Compiler
Sourcepub fn compile(self, code: &[u8]) -> CompileResult
pub fn compile(self, code: &[u8]) -> CompileResult
Compile an RV+C+custom-0 byte stream into x86-64 in a single streaming pass.
Decode + valid-PC + gas-block detection + gas simulation +
codegen all happen in one walk over code. No Predecode
intermediary — that was 57% of the old cold-path compile time
on the large guests (ed25519, ecrecover).
The internal rv_valid_pc bitmap (a bit set iff the PC is a
gas-block start) drives compile-time forward-branch validation
via is_basic_block_start. It is not surfaced: the runtime
validates jalr targets through the dense dispatch table
instead. Built incrementally during the streaming pass — no
separate length-only pre-pass.
Auto Trait Implementations§
impl Freeze for Compiler
impl RefUnwindSafe for Compiler
impl !Send for Compiler
impl !Sync for Compiler
impl Unpin for Compiler
impl UnsafeUnpin for Compiler
impl UnwindSafe for Compiler
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
Mutably borrows from an owned value. Read more