function luaY.singlevaraux(F,m,b,R,k)if m==nil then F:init_exp(R,"\086\071\076\079\066\065\076",luaP.NO_REG)return"\086\071\076\079\066\065\076"else local d=F:searchvar(m,b)if d>=0 then F:init_exp(R,"\086\076\079\067\065\076",d)if k==0 then F:markupval(m,d)end return"\086\076\079\067\065\076"else if F:singlevaraux(m.prev,b,R,0)=="\086\071\076\079\066\065\076"then return"\086\071\076\079\066\065\076"end R.info=F:indexupvalue(m,b,R)R.k="\086\085\080\086\065\076"return"\086\085\080\086\065\076"end end end

function luaY:singlevaraux(fs, n, var, base)
  if fs == nil then  -- no more levels?
    self:init_exp(var, "VGLOBAL", luaP.NO_REG)  -- default is global variable
    return "VGLOBAL"
  else
    local v = self:searchvar(fs, n)  -- look up at current level
    if v >= 0 then
      self:init_exp(var, "VLOCAL", v)
      if base == 0 then
        self:markupval(fs, v)  -- local will be used as an upval
      end
      return "VLOCAL"
    else  -- not found at current level; try upper one
      if self:singlevaraux(fs.prev, n, var, 0) == "VGLOBAL" then
        return "VGLOBAL"
      end
      var.info = self:indexupvalue(fs, n, var)  -- else was LOCAL or UPVAL
      var.k = "VUPVAL"  -- upvalue in this level
      return "VUPVAL"
    end--if v
  end--if fs
end
