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

Function create_immediates

cranelift/codegen/src/inline.rs:1614–1624  ·  view source on GitHub ↗

Copy immediates from the callee into the caller.

(func: &mut ir::Function, callee: &ir::Function)

Source from the content-addressed store, hash-verified

1612
1613/// Copy immediates from the callee into the caller.
1614fn create_immediates(func: &mut ir::Function, callee: &ir::Function) -> u32 {
1615 let offset = func.dfg.immediates.len();
1616 let offset = u32::try_from(offset).unwrap();
1617
1618 func.dfg.immediates.reserve(callee.dfg.immediates.len());
1619 for imm in callee.dfg.immediates.values() {
1620 func.dfg.immediates.push(imm.clone());
1621 }
1622
1623 offset
1624}
1625
1626/// Copy constants from the callee into the caller.
1627fn create_constants(allocs: &mut InliningAllocs, func: &mut ir::Function, callee: &ir::Function) {

Callers 1

create_entitiesFunction · 0.85

Calls 6

lenMethod · 0.45
unwrapMethod · 0.45
reserveMethod · 0.45
valuesMethod · 0.45
pushMethod · 0.45
cloneMethod · 0.45

Tested by

no test coverage detected