"inner loop in root trace"

  • From: Elias Hogstvedt <eliashogstvedt@xxxxxxxxx>
  • To: luajit@xxxxxxxxxxxxx
  • Date: Wed, 15 Oct 2014 21:38:00 +0200

I have a GUI where I draw the world panel which draws all its children. It
looks something like this:


function panel:Draw()
    self:OnDraw()

    for _, pnl in ipairs(self:GetChildren()) do
        pnl:Draw()
    end
end

world:Draw()


This causes the jit compiler to abort with the reason "inner loop in root
trace".

I've tried unrolling the loop (automatically) which sort of works but this
solution introduces a bunch of other issues, mainly around the need to
regenerate the unrolled loop function when making, removing or changing
draw orders.

I feel this is something the jit compiler should be able to do. Any
thoughts?

Other related posts: