Something something about JITting coroutines

  • From: "Soni L." <fakedme+lj@xxxxxxxxx>
  • To: luajit@xxxxxxxxxxxxx
  • Date: Sun, 22 Mar 2015 15:23:57 -0300

So like... I'm not sure how to put this, but I kinda need JITted coroutines, preferably inlined.


I noticed LuaJIT doesn't inline this:

local f1
local function f3()
  return f1
end
local function f2()
  return f3
end
function f1()
  return f2
end

local f
while true do
  f = f()
end

And f1's pointer doesn't get embed in f3, as it gets reassigned, so this isn't a good alternative to JITted + inlined coroutines. (this is also a pain to maintain :/)

Other related posts:

  • » Something something about JITting coroutines - Soni L.