function luaK.codenot(y,b,r)y:dischargevars(b,r)local X=r.k if X=="\086\078\073\076"or X=="\086\070\065\076\083\069"then r.k="\086\084\082\085\069"elseif X=="\086\075"or X=="\086\075\078\085\077"or X=="\086\084\082\085\069"then r.k="\086\070\065\076\083\069"elseif X=="\086\074\077\080"then y:invertjump(b,r)elseif X=="\086\082\069\076\079\067\065\066\076\069"or X=="\086\078\079\078\082\069\076\079\067"then y:discharge2anyreg(b,r)y:freeexp(b,r)r.info=y:codeABC(b,"\079\080\095\078\079\084",0,r.info,0)r.k="\086\082\069\076\079\067\065\066\076\069"else assert(0)end r.f,r.t=r.t,r.f y:removevalues(b,r.f)y:removevalues(b,r.t)end

function luaK:codenot(fs, e)
  self:dischargevars(fs, e)
  local k = e.k
  if k == "VNIL" or k == "VFALSE" then
    e.k = "VTRUE"
  elseif k == "VK" or k == "VKNUM" or k == "VTRUE" then
    e.k = "VFALSE"
  elseif k == "VJMP" then
    self:invertjump(fs, e)
  elseif k == "VRELOCABLE" or k == "VNONRELOC" then
    self:discharge2anyreg(fs, e)
    self:freeexp(fs, e)
    e.info = self:codeABC(fs, "OP_NOT", 0, e.info, 0)
    e.k = "VRELOCABLE"
  else
    assert(0)  -- cannot happen
  end
  -- interchange true and false lists
  e.f, e.t = e.t, e.f
  self:removevalues(fs, e.f)
  self:removevalues(fs, e.t)
end
