Any slice is to clone into the context allocator

This commit is contained in:
Joseph Ferano 2026-09-25 09:53:36 +07:00
parent 497881a333
commit ddff84ffed

View File

@ -223,7 +223,8 @@ arrives at the push. A =Vec= a call returned is accepted where an array a call
returned is refused: one dangles and one only leaks, and leaking is defined returned is refused: one dangles and one only leaks, and leaking is defined
behaviour here. behaviour here.
** TODO (clone slice) as the general spelling of what (bytes s) does ** NEXT (clone slice) as the general spelling of what (bytes s) does
Decided 2026-09-25: =(clone xs)= copies any slice into the context allocator, sharing =flan_bytes_dup='s lowering with =bytes=. The allocator's region answers who frees it.
Not built because of the who-frees question =bytes= answers by leaning on Not built because of the who-frees question =bytes= answers by leaning on
free-all and arena-destroy. =flan_bytes_dup= is already the lowering, so if slices free-all and arena-destroy. =flan_bytes_dup= is already the lowering, so if slices
grow a =clone= the two should share it. grow a =clone= the two should share it.