This commit is contained in:
2026-03-24 13:40:37 +00:00
parent dc7da102c8
commit 3d4d1dc45d
5 changed files with 17 additions and 57 deletions
+1 -49
View File
@@ -1,52 +1,4 @@
# PR-3.1 — Introduce HeapRef Handle Type in Value Model
### Briefing
The VM must reference heap objects through opaque handles. This PR introduces a `HeapRef` (or equivalent) type and integrates it into the VM value model without implementing the GC yet.
### Target
* Add a handle-based reference type for heap objects.
* Integrate it into the `Value` representation.
### Work items
* Define a `HeapRef` struct or newtype (e.g., index-based handle).
* Add a `Value::HeapRef` (or equivalent) variant.
* Ensure stack operations can carry this value type.
* Do not allocate real objects yet; this is only the type integration.
### Acceptance checklist
* [ ] `HeapRef` type exists and is used in `Value`.
* [ ] VM compiles with the new value variant.
* [ ] No GC or allocator logic is introduced yet.
* [ ] `cargo test` passes.
### Tests
* Existing tests only.
### Junie instructions
**You MAY:**
* Add a new handle type.
* Extend the `Value` enum/struct.
**You MUST NOT:**
* Design or implement the GC algorithm here.
* Introduce object allocation logic.
* Add hidden ownership or lifetime systems.
**If unclear:**
* Ask what fields the handle should contain.
---
# PR-3.2 — Define Heap Object Header and Object Kind Tags
## PR-3.2 — Define Heap Object Header and Object Kind Tags
### Briefing