implement PLN-0035 spec wording for materialization

This commit is contained in:
2026-04-20 08:51:36 +01:00
parent 811af09ea7
commit 762f60e00f
5 changed files with 33 additions and 3 deletions
@@ -27,6 +27,7 @@ The stack stores transient execution values and frame-scoped data.
The stack may contain:
- primitive values;
- string values;
- built-in fixed-layout values;
- heap handles;
- tuple-shaped multi-return values.
@@ -155,6 +156,15 @@ Heap allocation conceptually performs:
2. create or reuse gate entry;
3. return validated handle.
First materialization cost is distinct from repeated hot-path copy pressure.
Implications:
- constant-pool-backed values may pay materialization cost before execution begins;
- runtime-created values may pay materialization cost when a new value is semantically produced;
- the runtime SHOULD minimize repeated implicit copying on hot paths after that first materialization;
- zero-allocation happy-path work is an engineering optimization target, not a published compatibility guarantee by itself.
If allocation fails:
- the VM may trigger GC;