(&mut self, index: u16, value: FrameValue)
| 133 | if value == FrameValue::Top { |
| 134 | return Err(jvm::Error::VerificationError { |
| 135 | context: context.to_string(), |
| 136 | message: format!( |
| 137 | "Loaded uninitialized local {index} at instruction {instruction_index}" |
| 138 | ), |
| 139 | }); |
| 140 | } |
| 141 | } |
| 142 | self.store_local(index, value.clone()); |
| 143 | } |
| 144 | self.stack.push(value); |
| 145 | Ok(()) |
| 146 | } |
| 147 | |
| 148 | fn store_local(&mut self, index: u16, value: FrameValue) { |
| 149 | let index = index as usize; |
| 150 | let width = if value.is_category2() { 2 } else { 1 }; |
| 151 | let locals = Arc::make_mut(&mut self.locals); |
| 152 | if locals.len() < index + width { |
no test coverage detected