Reputation: 39
So im debugging my lua scripts now, and i here i came to question - is it possible to block function from compiling by using jit.attach
? (something like this)
local function jitcatch(dat)
local sour = string.sub( jit.util.funcinfo(dat).source, 2 )
if sour == 'test.lua' then jit.off(dat) end
end
jit.attach( jitcatch, 'bc' )
Upvotes: 0
Views: 350
Reputation: 333
jit.off(true, true) will disable jit compiling for the current script. jit.off(function) will disable jit compiling for a specific function.
Upvotes: 2