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

Function create_dynamic_stack_slots

cranelift/codegen/src/inline.rs:1593–1611  ·  view source on GitHub ↗

Copy dynamic stack slots from the callee into the caller.

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

Source from the content-addressed store, hash-verified

1591
1592/// Copy dynamic stack slots from the callee into the caller.
1593fn create_dynamic_stack_slots(
1594 func: &mut ir::Function,
1595 callee: &ir::Function,
1596 entity_map: &EntityMap,
1597) -> u32 {
1598 let offset = func.dynamic_stack_slots.len();
1599 let offset = u32::try_from(offset).unwrap();
1600
1601 func.dynamic_stack_slots
1602 .reserve(callee.dynamic_stack_slots.len());
1603 for ir::DynamicStackSlotData { kind, dyn_ty } in callee.dynamic_stack_slots.values() {
1604 func.dynamic_stack_slots.push(ir::DynamicStackSlotData {
1605 kind: *kind,
1606 dyn_ty: entity_map.inlined_dynamic_type(*dyn_ty),
1607 });
1608 }
1609
1610 offset
1611}
1612
1613/// Copy immediates from the callee into the caller.
1614fn create_immediates(func: &mut ir::Function, callee: &ir::Function) -> u32 {

Callers 1

create_entitiesFunction · 0.85

Calls 6

inlined_dynamic_typeMethod · 0.80
lenMethod · 0.45
unwrapMethod · 0.45
reserveMethod · 0.45
valuesMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected