Allocate a new stack slot.
(&mut self, ss: StackSlot, data: StackSlotData, loc: Location)
| 244 | |
| 245 | // Allocate a new stack slot. |
| 246 | fn add_ss(&mut self, ss: StackSlot, data: StackSlotData, loc: Location) -> ParseResult<()> { |
| 247 | self.map.def_ss(ss, loc)?; |
| 248 | while self.function.sized_stack_slots.next_key().index() <= ss.index() { |
| 249 | self.function.create_sized_stack_slot(StackSlotData::new( |
| 250 | StackSlotKind::ExplicitSlot, |
| 251 | 0, |
| 252 | 0, |
| 253 | )); |
| 254 | } |
| 255 | self.function.sized_stack_slots[ss] = data; |
| 256 | Ok(()) |
| 257 | } |
| 258 | |
| 259 | // Resolve a reference to a stack slot. |
| 260 | fn check_ss(&self, ss: StackSlot, loc: Location) -> ParseResult<()> { |
no test coverage detected