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(x,I,T,N,l)local function w(I,T)I.k=T.k I.info=T.info I.aux=T.aux I.nval=T.nval I.t=T.t I.f=T.f end if T=="\079\080\082\095\065\078\068"then assert(N.t==x.NO_JUMP)x:dischargevars(I,l)l.f=x:concat(I,l.f,N.f)w(N,l)elseif T=="\079\080\082\095\079\082"then assert(N.f==x.NO_JUMP)x:dischargevars(I,l)l.t=x:concat(I,l.t,N.t)w(N,l)elseif T=="\079\080\082\095\067\079\078\067\065\084"then x:exp2val(I,l)if l.k=="\086\082\069\076\079\067\065\066\076\069"and luaP:GET_OPCODE(x:getcode(I,l))=="\079\080\095\067\079\078\067\065\084"then assert(N.info==luaP:GETARG_B(x:getcode(I,l))-1)x:freeexp(I,N)luaP:SETARG_B(x:getcode(I,l),N.info)N.k="\086\082\069\076\079\067\065\066\076\069"N.info=l.info else x:exp2nextreg(I,l)x:codearith(I,"\079\080\095\067\079\078\067\065\084",N,l)end else local w=x.arith_op[T]if w then x:codearith(I,w,N,l)else local w=x.comp_op[T]if w then x:codecomp(I,w,x.comp_cond[T],N,l)else assert(0)end end end end
------------------------------------------------------------------------
--
-- * used only in (lparser) luaY:subexpr()
------------------------------------------------------------------------
-- table lookups to simplify testing
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
