(
&mut self,
context: &str,
instruction_index: usize,
)
| 64 | Self { |
| 65 | locals: Arc::new(locals), |
| 66 | stack: Vec::new(), |
| 67 | } |
| 68 | } |
| 69 | |
| 70 | fn pop(&mut self, context: &str, instruction_index: usize) -> jvm::Result<FrameValue> { |
| 71 | self.stack |
| 72 | .pop() |
| 73 | .ok_or_else(|| jvm::Error::VerificationError { |
| 74 | context: context.to_string(), |
| 75 | message: format!("Stack underflow at instruction {instruction_index}"), |
| 76 | }) |
| 77 | } |
| 78 | |
| 79 | fn pop_category1( |
| 80 | &mut self, |
| 81 | context: &str, |
| 82 | instruction_index: usize, |
| 83 | ) -> jvm::Result<FrameValue> { |
| 84 | let value = self.pop(context, instruction_index)?; |
no test coverage detected