Files
scriptc/packages
Chris Tate f9cd11e124 Return unions with reference arms in registers
Directly called functions returning a union of numbers, booleans, unit
values and class instances, strings, records or arrays now return its tag
and payload in registers, as scalar unions already did. A reference
payload carries the reference the heap box held. A wrapped return value
moves its reference into the pair, and a returned call with the same
convention passes its pair through.

Callers that only project the result keep it in a private stack box whose
payload the statement frame releases by tag. A discarded result releases
its payload from the registers. Locals bound to such results keep the
tag and payload: with one reference arm through the existing owner slot,
and with several through the box itself, released by tag on rebinding and
scope exit. Other callers, and the boxed entry used by closures, dispatch
and the runtime, box the pair. Functions with a finally block keep the
boxed result.
2026-10-15 18:52:54 -05:00
..
2026-10-15 11:23:16 -05:00
2026-10-15 11:23:16 -05:00
2026-10-15 11:23:16 -05:00
2026-10-15 11:23:16 -05:00
2026-10-15 11:23:16 -05:00
2026-10-15 11:23:16 -05:00
2026-10-15 11:23:16 -05:00
2026-10-15 11:23:16 -05:00
2026-10-15 11:23:16 -05:00
2026-10-15 11:23:16 -05:00
2026-10-15 11:23:16 -05:00
2026-10-15 11:23:16 -05:00
2026-10-15 11:23:16 -05:00
2026-10-15 11:23:16 -05:00
2026-10-15 11:23:16 -05:00
2026-10-15 11:23:16 -05:00
2026-10-15 11:23:16 -05:00
2026-10-15 16:32:19 -05:00
2026-10-15 11:23:16 -05:00
2026-10-15 11:23:16 -05:00
2026-10-15 11:23:16 -05:00
2026-10-15 11:23:16 -05:00
2026-10-15 11:23:16 -05:00
2026-10-15 11:23:16 -05:00
2026-10-15 11:23:16 -05:00
2026-10-15 16:32:19 -05:00
2026-10-15 11:23:16 -05:00
2026-10-15 11:23:16 -05:00
2026-10-15 11:23:16 -05:00
2026-10-15 11:23:16 -05:00