MCPcopy Create free account
hub / github.com/dylan-sutton-chavez/edge-python / call_sorted

Method call_sorted

compiler/src/modules/vm/builtins/sequence.rs:90–96  ·  view source on GitHub ↗
(&mut self, reverse: bool, chunk: &SSAChunk, slots: &mut [Val])

Source from the content-addressed store, hash-verified

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> {

Callers 2

handle_functionMethod · 0.80
call_sorted_with_keyMethod · 0.80

Calls 4

extract_iterMethod · 0.80
sort_by_ltMethod · 0.80
alloc_and_push_listMethod · 0.80
popMethod · 0.45

Tested by

no test coverage detected