Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I wonder if you could help my studying of LuaJIT #8

Open
tweyseo opened this issue Apr 25, 2019 · 0 comments
Open

I wonder if you could help my studying of LuaJIT #8

tweyseo opened this issue Apr 25, 2019 · 0 comments

Comments

@tweyseo
Copy link

tweyseo commented Apr 25, 2019

I was confused about the behavior of root-trace link, what's the different between link "return" and link self(loop or recursion):

local function f1(v) if v == 0 then return end f1(v - 1) end f1(109)

with log:

[TRACE 1 t1.lua:1 return]

and

local function f1(v) if v == 0 then return end f1(v - 1) end f1(112)

with log:

[TRACE 1 t1.lua:1 up-recursion]

And what does link in root-trace actually do?

In trace_abort(), the condition of calling penalty_pc():

if (J->parent == 0 && !bc_isret(bc_op(J->cur.startins)))

means first root trace and not in tail-recursion? and the inner condition:

if (J->exitno == 0)

what does this condition actually mean?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant