(&mut self)
| 294 | } |
| 295 | |
| 296 | pub fn handle_unreachable_end(&mut self) -> Result<()> { |
| 297 | let mut frame = self.pop_control_frame()?; |
| 298 | // We just popped the outermost block. |
| 299 | let is_outermost = self.control_frames.len() == 0; |
| 300 | |
| 301 | if frame.is_next_sequence_reachable() { |
| 302 | self.context.reachable = true; |
| 303 | frame.ensure_stack_state(self.masm, &mut self.context)?; |
| 304 | frame.bind_end(self.masm, &mut self.context) |
| 305 | } else if is_outermost { |
| 306 | // If we reach the end of the function in an unreachable |
| 307 | // state, perform the necessary cleanup to leave the stack |
| 308 | // and SP in the expected state. The compiler can enter |
| 309 | // in this state through an infinite loop. |
| 310 | frame.ensure_stack_state(self.masm, &mut self.context) |
| 311 | } else { |
| 312 | Ok(()) |
| 313 | } |
| 314 | } |
| 315 | |
| 316 | fn emit_body( |
| 317 | &mut self, |
no test coverage detected