mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-07-26 06:38:42 +00:00
a683881eb7
Follow returned pointer aliases when deciding whether runtime.alloc calls can be lowered to stack allocations. A returned parameter is not the same as nocapture: it still flows back to the caller and must be checked as an alias of the original allocation. Keep the analysis conservative for recursive returned-parameter chains and unknown operands. The existing golden test now shows that the non-escaping returned pointer cases no longer require heap allocation.