[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: C tail calls
- From: gottfried leibniz <gottfried.leibniz.windoze@...>
- Date: Sat, 10 Jul 2021 10:37:56 -0300
Hello,
Should luaD_precall's invocation of luaD_hook, see [1], reflect the
recent changes to C functions and tail calls (i.e., check CIST_TAIL)?
For instance
function b() return string.format("%s %s!", "Hello", "World") end
function a() return b() end
local result = a()
Will generate debug events: "call", "tail call", "call", "return".
Compared previously: "call", "tail call", "call", "return", "return".
Thanks.
[1] https://github.com/lua/lua/blob/master/ldo.c#L538