blaise/compiler
Graeme Geldenhuys 175a5cc692 fix(codegen): self-assigned record method no longer aliases Self (M := M.Method())
Assigning a record-returning method's result back into the same variable
that is the receiver (M := M.Method(...)) corrupted the computation: the
sret destination buffer aliased Self, so the callee wrote Result (== Self)
while still reading Self, clobbering it mid-flight.  Affected both backends.

Both backends now detect the case where the call's receiver is exactly the
destination variable and route the sret call through a fresh zeroed temporary,
moving the constructed result into the destination (release old managed fields,
raw ownership-transfer memcpy) only after the call returns.

Adds an IR unit test (RoutesThroughTemp) and two e2e tests (managed-string
field and scalar fields) covering the self-assign and a non-aliasing
regression guard.
2026-06-24 17:15:46 +01:00
..
src fix(codegen): self-assigned record method no longer aliases Self (M := M.Method()) 2026-06-24 17:15:46 +01:00
project.xml Revert defaulting the compiler to Native backend. 2026-06-11 22:53:26 +01:00