(&mut self, vm: &VirtualMachine)
| 7106 | |
| 7107 | #[cold] |
| 7108 | fn setup_annotations(&mut self, vm: &VirtualMachine) -> FrameResult { |
| 7109 | let __annotations__ = identifier!(vm, __annotations__); |
| 7110 | let locals_obj = self.locals.as_object(vm); |
| 7111 | // Try using locals as dict first, if not, fallback to generic method. |
| 7112 | let has_annotations = if let Some(d) = locals_obj.downcast_ref_if_exact::<PyDict>(vm) { |
| 7113 | d.contains_key(__annotations__, vm) |
| 7114 | } else { |
| 7115 | self._in(vm, __annotations__.as_object(), locals_obj)? |
| 7116 | }; |
| 7117 | if !has_annotations { |
| 7118 | locals_obj.set_item(__annotations__, vm.ctx.new_dict().into(), vm)?; |
| 7119 | } |
| 7120 | Ok(None) |
| 7121 | } |
| 7122 | |
| 7123 | /// _PyEval_UnpackIterableStackRef |
| 7124 | fn unpack_sequence(&mut self, size: u32, vm: &VirtualMachine) -> FrameResult { |
no test coverage detected