Is it possible with callconv or something to use musttail like here https://blog.reverberate.org/2021/04/21/musttail-efficient-interpreters.html
Parsing, performance, and low-level programming.
1 messages · Page 1 of 1 (latest)
Is it possible with callconv or something to use musttail like here https://blog.reverberate.org/2021/04/21/musttail-efficient-interpreters.html
Parsing, performance, and low-level programming.
You might be looking for @call(.{.modifier = .always_tail}, myFunc, .{arg1, arg2})
https://ziglang.org/documentation/master/#call
That's at the call site though, not where the function is defined
Makes sense i’ll try it out
Doesn’t seem to like a call to a function that can raise an error
IR generated check for an error before returning
it does if you yourself can return that error
as long as it's a plain return ... it's fine
if you do return ... catch ... you can't tailcall
So if an error can occur elsewhere in the function body it doesn’t work?