Re: Any LuaJIT "continue" patch?

  • From: Denis Golovan <denis.golovan@xxxxxxxxx>
  • To: luajit@xxxxxxxxxxxxx
  • Date: Thu, 13 Apr 2017 16:25:10 +0300

Yeap, unfortunately "goto" does not solve complex cases like jumping
over local variables.
Personally, I also consider "continue" as valuable addition to LuaJIT.

2017-04-13 16:07 GMT+03:00 Lennart Bernhardt <l.bernhardt@xxxxxxx>:

You can just use a goto like so:

for i=1,10 do
  if i % 2 == 0 then goto continue end
  print(i)
  ::continue::
end


On Thu, Apr 13, 2017 at 6:07 AM, Glenn Maynard <glenn@xxxxxxxx> wrote:

I'm testing out converting a Lua project to LuaJIT, and dealing with a few
langauge patches we use that need to be reimplemented.

One adds continue (http://www.corsix.org/luacontinue/continue.patch),
which is indispensable.  Is there any similar patch for LuaJIT?  I'm
guessing this can be done entirely within the parser without touching
codegen.

--
Glenn Maynard



Other related posts: