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

Method call_set

compiler/src/modules/vm/builtins/container.rs:144–155  ·  view source on GitHub ↗
(&mut self, op: u16)

Source from the content-addressed store, hash-verified

142 }
143
144 pub fn call_set(&mut self, op: u16) -> Result<(), VmErr> {
145 if op == 0 {
146 let val = self.alloc_set(Vec::new())?;
147 self.push(val);
148 } else {
149 let o = self.pop()?;
150 let src = self.extract_iter(o, true)?;
151 let val = self.alloc_set(src)?;
152 self.push(val);
153 }
154 Ok(())
155 }
156
157 /* `frozenset()` | `frozenset(iter)`, construct an immutable, hashable set from an iterable. Without args returns the empty frozenset. */
158 pub fn call_frozenset(&mut self, argc: u16) -> Result<(), VmErr> {

Callers 2

handle_functionMethod · 0.80
dispatch_nativeMethod · 0.80

Calls 4

alloc_setMethod · 0.80
pushMethod · 0.80
extract_iterMethod · 0.80
popMethod · 0.45

Tested by

no test coverage detected