(&mut self, reverse: bool, chunk: &SSAChunk, slots: &mut [Val])
| 88 | } |
| 89 | |
| 90 | pub fn call_sorted(&mut self, reverse: bool, chunk: &SSAChunk, slots: &mut [Val]) -> Result<(), VmErr> { |
| 91 | let o = self.pop()?; |
| 92 | let mut items = self.extract_iter(o, false)?; |
| 93 | self.sort_by_lt(&mut items, chunk, slots)?; |
| 94 | if reverse { items.reverse(); } |
| 95 | self.alloc_and_push_list(items) |
| 96 | } |
| 97 | |
| 98 | /* sorted(iterable, key=fn, reverse=False) — delegates to call_sorted when key is absent. */ |
| 99 | pub fn call_sorted_with_key(&mut self, key: Option<Val>, reverse: bool, chunk: &crate::modules::parser::SSAChunk, slots: &mut [Val]) -> Result<(), VmErr> { |
no test coverage detected