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

Method function

crates/fuzzing/src/generators/stacks.rs:406–409  ·  view source on GitHub ↗

Helper that defines a function body in the code section and takes ownership of it so that it is dropped and its memory reclaimed after adding it to the module.

(code: &mut wasm_encoder::CodeSection, mut func: wasm_encoder::Function)

Source from the content-addressed store, hash-verified

404 // ownership of it so that it is dropped and its memory reclaimed after
405 // adding it to the module.
406 fn function(code: &mut wasm_encoder::CodeSection, mut func: wasm_encoder::Function) {
407 func.instruction(&Instruction::End);
408 code.function(&func);
409 }
410 }
411}
412

Callers 8

build_wasmFunction · 0.45
typesMethod · 0.45
functionsMethod · 0.45
finishFunction · 0.45
to_bytesMethod · 0.45
encodeMethod · 0.45
wasmMethod · 0.45
to_wasm_binaryMethod · 0.45

Calls 1

instructionMethod · 0.80

Tested by

no test coverage detected