Copy dynamic stack slots from the callee into the caller.
(
func: &mut ir::Function,
callee: &ir::Function,
entity_map: &EntityMap,
)
| 1591 | |
| 1592 | /// Copy dynamic stack slots from the callee into the caller. |
| 1593 | fn 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. |
| 1614 | fn create_immediates(func: &mut ir::Function, callee: &ir::Function) -> u32 { |
no test coverage detected