Target-independent layout RTTI (Tier B)
- Type: feature
- Status: done
- Owner: Antigravity
- Blocked-by: feature-cross-bootstrap
- Unblocks: feature-target-arm32, feature-target-i386
- Found / Opened: 2026-06-11
Description
Replace target-specific assembly-code walkers (for managed record retain/release, nested dynamic array release, and copy-on-write dynamic array cloning) with a generic, relative offset-based layout table (RTTI) traversed by target-independent runtime helpers in builtinheap.pas. This allows managed records and dynamic arrays to work across all target architectures (like i386, ARM32, AArch64) without requiring architecture-specific codegen emitters.
Log
- 2026-06-11 — Tier B layout RTTI completed. Added runtime helpers (
PXXRecordRetain,PXXRecordRelease,PXXDynArrayRelease,PXXDynArrayUnique) inbuiltinheap.pas. Added RTTI compiler emission inrtti_emit.incand resolved references dynamically inir_codegen.incto avoid link-time resolution failures for local variables. Fixed System V ABI register-clobbering bug inSetLengthloops and fixed dynamic array field RTTI count mapping. All tests compiled, self-bootstrapped, and verified successfully. - 2026-06-11 — Validation pass:
git diff --check, focused dynamic-array/managed-record tests,make test, andmake test-nilpyall pass. Follow-up race condition filed asbug-threadsafe-layout-rtti-helper-races. Commit: 58e3803.