shadowofneptune parent
Static stack allocation is the approach that the 6502 really demands, and it's cool to see in a conventional compiler toolchain. See the Cowgol language for another example: https://cowlark.com/cowgol/
There's another that uses what they call a "compiled stack" which I believe is the same concept.
https://www.dustmop.io/blog/2019/09/10/what-remains-technica...
That requires the compiler to be aware of non-reentrant functions, though. It might be viable in small-scale codebases as are common in much embedded code, which is where a 6502 would most likely be used.