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

Function insert_const

cranelift/fuzzgen/src/function_generator.rs:234–246  ·  view source on GitHub ↗
(
    fgen: &mut FunctionGenerator,
    builder: &mut FunctionBuilder,
    _opcode: Opcode,
    _args: &[Type],
    rets: &[Type],
)

Source from the content-addressed store, hash-verified

232}
233
234fn insert_const(
235 fgen: &mut FunctionGenerator,
236 builder: &mut FunctionBuilder,
237 _opcode: Opcode,
238 _args: &[Type],
239 rets: &[Type],
240) -> Result<()> {
241 let typevar = rets[0];
242 let var = fgen.get_variable_of_type(typevar)?;
243 let val = fgen.generate_const(builder, typevar)?;
244 builder.def_var(var, val);
245 Ok(())
246}
247
248fn insert_bitcast(
249 fgen: &mut FunctionGenerator,

Callers

nothing calls this directly

Calls 4

OkFunction · 0.85
get_variable_of_typeMethod · 0.80
generate_constMethod · 0.80
def_varMethod · 0.45

Tested by

no test coverage detected