@@ -9,19 +9,21 @@ activation gate: these result classes use the same ABI-driven argument
99recorder, native-frame lifecycle, and CALLXS emission as the unboxed scalar
1010classes.
1111
12- Bool remains interpreted because normalization still needs a replay-safe
13- post-side-effect contract. Aggregate and multi-register results remain future
14- work. No file under ` plan/ ` was changed.
12+ At this checkpoint bool remained interpreted and aggregate results remained
13+ future work. Subsequent same-day tranches admitted replay-safe bool and
14+ ABI-indirect aggregate results; this note is retained as the historical boxed
15+ admission checkpoint. No file under ` plan/ ` was changed.
1516
1617## Recorder protocol
1718
1819The recorder captures the exact raw child CType ID, immutable return info,
1920size, and raw IR type before recording arguments. This is necessary because
2021vararg inference may grow and relocate the CType table. Raw-child lookup strips
21- attributes exactly as the interpreter does, while preserving reference and enum
22- identity. Consequently attributed integer typedefs, explicit C references, and
23- enum results retain the correct box type without consulting a stale CType
24- pointer.
22+ outer attributes exactly as the interpreter does, while preserving reference
23+ and enum identity. Consequently attributed integer, pointer, and enum
24+ declarations produce the same raw box CType as a cold call; explicit C
25+ references remain references because ` CTF_REF ` is not an outer attribute node.
26+ No classification consults a stale CType pointer.
2527
2628After all argument guards and conversions, a boxed result follows this order:
2729
@@ -56,12 +58,13 @@ managed-edge aggregates without a write-barrier design.
5658
5759## Compatibility and cost
5860
59- The public LuaJIT API and ABI are unchanged. The interpreter-visible values
60- keep their exact CType identity, including reference and attributed return
61- types. The generated path allocates the result box immediately before the
62- foreign call instead of immediately after it; this enables safe rooting without
63- adding a signature-specific wrapper or a post-return allocation. The only
64- post-return addition is the raw payload store.
61+ The public LuaJIT API and ABI are unchanged. Generated values keep the
62+ interpreter's exact resolved CType identity: outer scalar/pointer/enum
63+ attributes are stripped, enums retain their enum node, and references retain
64+ their reference node. The generated path allocates the result box immediately
65+ before the foreign call instead of immediately after it; this enables safe
66+ rooting without adding a signature-specific wrapper or a post-return
67+ allocation. The only post-return addition is the raw payload store.
6568
6669As previously authorized for the beta line, custom ` lua_Alloc ` remains
6770temporarily ignored by the GC2/internal allocator policy. This admission uses
@@ -72,8 +75,9 @@ silently treated as complete.
7275## Evidence
7376
7477- The authentic Lua fixture mechanically requires CALLXS for pointer,
75- reference, enum, i64, u64, high-bit u64, and an attributed u64 typedef; bool
76- mechanically remains interpreted.
78+ reference, enum, i64, u64, high-bit u64, and attributed integer/pointer/enum
79+ declarations. JIT-disabled baselines require exact ` ffi.typeof() ` and
80+ ` ffi.alignof() ` equality after outer attributes are stripped.
7781- The generated ABI catalogue requires the generic path for all 320 admitted
7882 rows: 211 unboxed scalar rows and 109 newly admitted boxed rows.
7983- IR inspection proves one exact ` IR_CNEW ` root, inclusion only in the XSAVE
@@ -99,12 +103,13 @@ silently treated as complete.
99103Clean default, ` LUAJIT_DISABLE_JIT ` , and ` LUAJIT_DISABLE_FFI ` builds and runtime
100104smokes pass independently of the sanitizer builds.
101105
102- ## Next work
106+ ## Next work at this checkpoint
103107
104- The immediate FFI/JIT follow-ups are replay-safe bool results, broader
105- protected/continuation and root/tail trace shapes, and aggregate or
106- multi-register ABI results. These remain generic ABI-lowering problems; they
107- must not reintroduce explicit C-signature matching. Cross-platform deep
108- validation and performance work remain b1.2.1 tasks, with the temporary custom
109- allocator exception and the separate Lua ` atomic ` library scheduled after the
110- core correctness tranches.
108+ Replay-safe bool and ABI-indirect aggregate results were the immediate
109+ follow-ups and are now covered by their later notes. Broader
110+ protected/continuation and root/tail trace shapes, direct/multi-register
111+ aggregate ABI results, cross-platform deep validation, and performance work
112+ remain b1.2.1 tasks. They must remain generic ABI-lowering work and must not
113+ reintroduce explicit C-signature matching. The temporary custom allocator
114+ exception and separate Lua ` atomic ` library remain scheduled after the core
115+ correctness tranches.
0 commit comments