This commit is contained in:
2026-03-24 13:40:41 +00:00
parent 70c5e08d66
commit 123d39331e
3 changed files with 26 additions and 40 deletions
-40
View File
@@ -1,43 +1,3 @@
# PR-7.3 — SPAWN Instruction
## Briefing
SPAWN creates a new coroutine and schedules it.
## Target
Introduce opcode:
`SPAWN fn_id, arg_count`
Semantics:
* Pop `arg_count` args.
* Create new coroutine object.
* Initialize its stack/frame with entry fn.
* Push coroutine handle onto ready queue.
Current coroutine continues execution.
## Checklist
* [ ] SPAWN opcode exists.
* [ ] Coroutine created.
* [ ] Scheduled in ready queue.
* [ ] No immediate context switch.
## Tests
* Spawn coroutine and verify it appears in ready queue.
## Junie Rules
You MAY modify interpreter dispatch.
You MUST NOT switch execution immediately.
If entry frame layout unclear, STOP and ask.
---
# PR-7.4 — YIELD Instruction
## Briefing