Discussion:
"inner loop in root trace"
Elias Hogstvedt
2014-10-15 19:38:00 UTC
Permalink
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?
Elias Hogstvedt
2014-10-15 19:56:21 UTC
Permalink
I kind of see the reason now. There's no way for the compiler to know how
many children are added since it can change in runtime.

Continue reading on narkive:
Loading...