(&self, depth: usize)
| 558 | } |
| 559 | |
| 560 | fn stack_base_at_frame(&self, depth: usize) -> StackBase { |
| 561 | let Some(frame) = self.validator.get_control_frame(depth) else { |
| 562 | return StackBase::default(); |
| 563 | }; |
| 564 | let mut base = StackBase::default(); |
| 565 | let stack_height = self.validator.operand_stack_height() as usize; |
| 566 | for i in 0..frame.height { |
| 567 | let depth_from_top = stack_height - 1 - i; |
| 568 | if let Some(Some(ty)) = self.validator.get_operand_type(depth_from_top) { |
| 569 | match operand_size(ty) { |
| 570 | OperandSize::S32 => base.s32 += 1, |
| 571 | OperandSize::S64 => base.s64 += 1, |
| 572 | OperandSize::S128 => base.s128 += 1, |
| 573 | } |
| 574 | } |
| 575 | } |
| 576 | |
| 577 | base |
| 578 | } |
| 579 | |
| 580 | fn unsupported(&mut self, name: &str) { |
| 581 | self.record_error(crate::ParseError::UnsupportedOperator(name.to_string())); |
no test coverage detected