MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / compile_and_emit

Method compile_and_emit

cranelift/codegen/src/context.rs:114–123  ·  view source on GitHub ↗
(
        &mut self,
        isa: &dyn TargetIsa,
        mem: &mut Vec<u8>,
        ctrl_plane: &mut ControlPlane,
    )

Source from the content-addressed store, hash-verified

112 /// Compile the function, and emit machine code into a `Vec<u8>`.
113 #[deprecated = "use Context::compile"]
114 pub fn compile_and_emit(
115 &mut self,
116 isa: &dyn TargetIsa,
117 mem: &mut Vec<u8>,
118 ctrl_plane: &mut ControlPlane,
119 ) -> CompileResult<'_, &CompiledCode> {
120 let compiled_code = self.compile(isa, ctrl_plane)?;
121 mem.extend_from_slice(compiled_code.code_buffer());
122 Ok(compiled_code)
123 }
124
125 /// Internally compiles the function into a stencil.
126 ///

Callers

nothing calls this directly

Calls 3

OkFunction · 0.85
code_bufferMethod · 0.80
compileMethod · 0.45

Tested by

no test coverage detected