a < b via __lt__ when either side defines it, else the built-in comparison.
(&mut self, a: Val, b: Val, chunk: &SSAChunk, slots: &mut [Val])
| 163 | |
| 164 | // a < b via __lt__ when either side defines it, else the built-in comparison. |
| 165 | pub(crate) fn sort_lt(&mut self, a: Val, b: Val, chunk: &SSAChunk, slots: &mut [Val]) -> Result<bool, VmErr> { |
| 166 | if let Some(r) = self.try_compare_dunder(OpCode::Lt, a, b, chunk, slots)? { |
| 167 | return Ok(self.truthy(r)); |
| 168 | } |
| 169 | self.lt_vals(a, b) |
| 170 | } |
| 171 | |
| 172 | /* In-place sort dispatching `__lt__`; roots items since a comparison can run user code that GCs. */ |
| 173 | pub(crate) fn sort_by_lt(&mut self, items: &mut [Val], chunk: &SSAChunk, slots: &mut [Val]) -> Result<(), VmErr> { |
no test coverage detected