Skip to content

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

Description

@tweyseo

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions