This commit is contained in:
2026-03-24 13:40:37 +00:00
parent 8b744a120e
commit 790629fee7
2 changed files with 7 additions and 78 deletions
-51
View File
@@ -1,54 +1,3 @@
# PR-2.2 — Simplify VM Execution Loop (Pure Stack Machine)
### Briefing
The VM should operate as a simple stack-based interpreter with a clear fetch–decode–execute loop, without hidden side channels or legacy behaviors.
### Target
* Normalize the VM main loop to a clean stack-machine structure.
* Remove any legacy control paths tied to HIP/RC behavior.
### Work items
* Refactor the main interpreter loop to:
* Fetch instruction at PC.
* Decode opcode.
* Execute operation on stack/frames.
* Remove any conditional logic that depends on HIP/RC state.
* Ensure PC advancement is canonical and centralized.
### Acceptance checklist
* [ ] VM loop is structurally simple and readable.
* [ ] No HIP/RC conditionals remain.
* [ ] VM compiles and runs basic programs.
* [ ] `cargo test` passes.
### Tests
* Existing tests only.
### Junie instructions
**You MAY:**
* Refactor the interpreter loop for clarity.
* Remove legacy conditionals.
**You MUST NOT:**
* Change opcode semantics.
* Introduce GC, closures, or coroutines here.
* Redesign the instruction set.
**If unclear:**
* Ask before modifying control flow assumptions.
---
# PR-2.3 — Normalize Value Model (Stack vs Heap References)
### Briefing