luaK.arith_op={OPR_ADD="\079\080\095\065\068\068",OPR_SUB="\079\080\095\083\085\066",OPR_MUL="\079\080\095\077\085\076",OPR_DIV="\079\080\095\068\073\086",OPR_MOD="\079\080\095\077\079\068";OPR_POW="\079\080\095\080\079\087"}luaK.comp_op={OPR_EQ="\079\080\095\069\081",OPR_NE="\079\080\095\069\081",OPR_LT="\079\080\095\076\084";OPR_LE="\079\080\095\076\069",OPR_GT="\079\080\095\076\084";OPR_GE="\079\080\095\076\069"}luaK.comp_cond={OPR_EQ=1,OPR_NE=0;OPR_LT=1;OPR_LE=1;OPR_GT=0,OPR_GE=0}function luaK.posfix(w,c,g,o,p)local function R(c,g)c.k=g.k c.info=g.info c.aux=g.aux c.nval=g.nval c.t=g.t c.f=g.f end if g=="\079\080\082\095\065\078\068"then assert(o.t==w.NO_JUMP)w:dischargevars(c,p)p.f=w:concat(c,p.f,o.f)R(o,p)elseif g=="\079\080\082\095\079\082"then assert(o.f==w.NO_JUMP)w:dischargevars(c,p)p.t=w:concat(c,p.t,o.t)R(o,p)elseif g=="\079\080\082\095\067\079\078\067\065\084"then w:exp2val(c,p)if p.k=="\086\082\069\076\079\067\065\066\076\069"and luaP:GET_OPCODE(w:getcode(c,p))=="\079\080\095\067\079\078\067\065\084"then assert(o.info==luaP:GETARG_B(w:getcode(c,p))-1)w:freeexp(c,o)luaP:SETARG_B(w:getcode(c,p),o.info)o.k="\086\082\069\076\079\067\065\066\076\069"o.info=p.info else w:exp2nextreg(c,p)w:codearith(c,"\079\080\095\067\079\078\067\065\084",o,p)end else local R=w.arith_op[g]if R then w:codearith(c,R,o,p)else local R=w.comp_op[g]if R then w:codecomp(c,R,w.comp_cond[g],o,p)else assert(0)end end end end

luaK.arith_op = {
  OPR_ADD = "OP_ADD", OPR_SUB = "OP_SUB", OPR_MUL = "OP_MUL",
  OPR_DIV = "OP_DIV", OPR_MOD = "OP_MOD", OPR_POW = "OP_POW",
}
luaK.comp_op = {
  OPR_EQ = "OP_EQ", OPR_NE = "OP_EQ", OPR_LT = "OP_LT",
  OPR_LE = "OP_LE", OPR_GT = "OP_LT", OPR_GE = "OP_LE",
}
luaK.comp_cond = {
  OPR_EQ = 1, OPR_NE = 0, OPR_LT = 1,
  OPR_LE = 1, OPR_GT = 0, OPR_GE = 0,
}
function luaK:posfix(fs, op, e1, e2)
  -- needed because e1 = e2 doesn't copy values...
  -- * in 5.0.x, only k/info/aux/t/f copied, t for AND, f for OR
  --   but here, all elements are copied for completeness' sake
  local function copyexp(e1, e2)
    e1.k = e2.k
    e1.info = e2.info; e1.aux = e2.aux
    e1.nval = e2.nval
    e1.t = e2.t; e1.f = e2.f
  end
  if op == "OPR_AND" then
    assert(e1.t == self.NO_JUMP)  -- list must be closed
    self:dischargevars(fs, e2)
    e2.f = self:concat(fs, e2.f, e1.f)
    copyexp(e1, e2)
  elseif op == "OPR_OR" then
    assert(e1.f == self.NO_JUMP)  -- list must be closed
    self:dischargevars(fs, e2)
    e2.t = self:concat(fs, e2.t, e1.t)
    copyexp(e1, e2)
  elseif op == "OPR_CONCAT" then
    self:exp2val(fs, e2)
    if e2.k == "VRELOCABLE" and luaP:GET_OPCODE(self:getcode(fs, e2)) == "OP_CONCAT" then
      assert(e1.info == luaP:GETARG_B(self:getcode(fs, e2)) - 1)
      self:freeexp(fs, e1)
      luaP:SETARG_B(self:getcode(fs, e2), e1.info)
      e1.k = "VRELOCABLE"
      e1.info = e2.info
    else
      self:exp2nextreg(fs, e2)  -- operand must be on the 'stack'
      self:codearith(fs, "OP_CONCAT", e1, e2)
    end
  else
    -- the following uses a table lookup in place of conditionals
    local arith = self.arith_op[op]
    if arith then
      self:codearith(fs, arith, e1, e2)
    else
      local comp = self.comp_op[op]
      if comp then
        self:codecomp(fs, comp, self.comp_cond[op], e1, e2)
      else
        assert(0)
      end
    end--if arith
  end--if op
end
