function luaY.repeatstat(o,e,Q)local H=e.fs local Z=luaK:getlabel(H)local M,D={},{}o:enterblock(H,M,true)o:enterblock(H,D,false)luaX:next(e)o:chunk(e)o:check_match(e,"\084\075\095\085\078\084\073\076","\084\075\095\082\069\080\069\065\084",Q)local t=o:cond(e)if not D.upval then o:leaveblock(H)luaK:patchlist(e.fs,t,Z)else o:breakstat(e)luaK:patchtohere(e.fs,t)o:leaveblock(H)luaK:patchlist(e.fs,luaK:jump(H),Z)end o:leaveblock(H)end

function luaY:repeatstat(ls, line)
  -- repeatstat -> REPEAT block UNTIL cond
  local fs = ls.fs
  local repeat_init = luaK:getlabel(fs)
  local bl1, bl2 = {}, {}  -- BlockCnt
  self:enterblock(fs, bl1, true)  -- loop block
  self:enterblock(fs, bl2, false)  -- scope block
  luaX:next(ls)  -- skip REPEAT
  self:chunk(ls)
  self:check_match(ls, "TK_UNTIL", "TK_REPEAT", line)
  local condexit = self:cond(ls)  -- read condition (inside scope block)
  if not bl2.upval then  -- no upvalues?
    self:leaveblock(fs)  -- finish scope
    luaK:patchlist(ls.fs, condexit, repeat_init)  -- close the loop
  else  -- complete semantics when there are upvalues
    self:breakstat(ls)  -- if condition then break
    luaK:patchtohere(ls.fs, condexit)  -- else...
    self:leaveblock(fs)  -- finish scope...
    luaK:patchlist(ls.fs, luaK:jump(fs), repeat_init)  -- and repeat
  end
  self:leaveblock(fs)  -- finish loop
end
