This commit is contained in:
2026-03-24 13:40:37 +00:00
parent 790629fee7
commit 8d80685654
5 changed files with 6 additions and 61 deletions
-55
View File
@@ -1,58 +1,3 @@
# PR-2.3 — Normalize Value Model (Stack vs Heap References)
### Briefing
The VM must use a clear value model: primitives and tuples on the stack, heap objects referenced through opaque handles. This PR prepares the VM for the GC-based heap.
### Target
* Define a single `Value` representation that distinguishes:
* Immediate primitives.
* Heap references (opaque handles).
* Remove any gate-based or borrow-based value types.
### Work items
* Review the `Value` or equivalent enum/struct.
* Remove variants related to gates, borrows, or HIP.
* Ensure only the following categories remain:
* Primitives (int, bool, etc.).
* Tuples or small aggregates.
* Heap reference handle (placeholder for future GC objects).
* Update stack operations accordingly.
### Acceptance checklist
* [ ] `Value` type has no HIP/gate-related variants.
* [ ] All stack operations compile with the new value model.
* [ ] No borrow/mutate semantics remain.
* [ ] `cargo test` passes.
### Tests
* Existing tests only.
### Junie instructions
**You MAY:**
* Simplify the `Value` enum/struct.
* Remove legacy variants and adjust matches.
**You MUST NOT:**
* Design the GC handle layout.
* Introduce new object systems.
* Change instruction semantics beyond type cleanup.
**If unclear:**
* Ask what the intended value shape should be.
---
# PR-2.4 — Consolidate Trap and Error Surface
### Briefing