local f1, f2, f3
f1 = function ()
return f2()
end
f2 = function ()
return f3()
end
f3 = function ()
return 1
end
local function on_hook(event, line)
local info = debug.getinfo(2, "nfS")
print(info.name, event)
end
debug.sethook(on_hook, "cr")
f1()
debug.sethook()
插件的结果
sethook return
f1 call
f2 call
f3 call
f3 return
f2 return
f1 return
sethook call
插件的结果
直接用Lua54的结果
请问插件使用了什么方法关闭了尾调用优化?