This commit is contained in:
2026-03-24 13:40:37 +00:00
parent 3d4d1dc45d
commit 650f1e0716
3 changed files with 104 additions and 51 deletions
-51
View File
@@ -1,54 +1,3 @@
## PR-3.2 — Define Heap Object Header and Object Kind Tags
### Briefing
All heap objects must share a common header so the GC can traverse them. This PR introduces the canonical object header and object kind tagging.
### Target
* Define a unified object header.
* Introduce object kind tags for future types (array, string, closure, etc.).
### Work items
* Define `ObjectHeader` containing:
* Mark bit or flag.
* Object kind/tag.
* Size or length field if required.
* Define an `ObjectKind` enum.
* Ensure header layout is clearly documented in comments.
* Do not implement traversal or GC logic yet.
### Acceptance checklist
* [ ] `ObjectHeader` and `ObjectKind` are defined.
* [ ] Code compiles without GC logic.
* [ ] Comments explain header semantics in English.
* [ ] `cargo test` passes.
### Tests
* None required.
### Junie instructions
**You MAY:**
* Introduce header structs and enums.
* Add comments explaining layout.
**You MUST NOT:**
* Implement object traversal logic.
* Add allocation strategies or pools.
**If unclear:**
* Ask before choosing header fields.
---
# PR-3.3 — Implement Basic Heap Allocator (No GC Yet)
### Briefing