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

Method handle_yield

compiler/src/modules/vm/handlers/data.rs:169–174  ·  view source on GitHub ↗

Yield: keep the value on the stack and flag the executor to suspend. */

(&mut self)

Source from the content-addressed store, hash-verified

167
168 /* Yield: keep the value on the stack and flag the executor to suspend. */
169 pub(crate) fn handle_yield(&mut self) -> Result<(), VmErr> {
170 let v = self.pop()?;
171 self.push(v);
172 self.yielded = true;
173 Ok(())
174 }
175
176 /* Side-effecting / impure ops: assert, del, global/nonlocal, import, type alias, raise, await. */
177 pub(crate) fn handle_side(&mut self, op: OpCode, operand: u16, chunk: &SSAChunk, slots: &mut [Val]) -> Result<(), VmErr> {

Callers 1

dispatch_genericMethod · 0.80

Calls 2

pushMethod · 0.80
popMethod · 0.45

Tested by

no test coverage detected