/* Emit code for equality comparisons ('==', '~='). 'e1' was already put as RK by 'luaK_infix'.  */
static void codeeq(FuncState *fs, BinOpr opr, expdesc *e1, expdesc *e2)
/* Emit code for equality comparisons ('==', '~='). 'e1' was already put as RK by 'luaK_infix'.  */
static void codeeq(FuncState *fs, BinOpr opr, expdesc *e1, expdesc *e2)
{
    lua_assert(e1->k == VK || e1->k == VKINT || e1->k == VKFLT);
    swapexps(e1, e2);
  }
  r1 = luaK_exp2anyreg(fs, e1);
  if (isSCnumber(e2, &im, &isfloat)) {
    op = OP_EQI;
    r2 = im;
  }
  else if (luaK_exp2RK(fs, e2)) {
    op = OP_EQK;
    r2 = e2->u.info;
  }
  else {
    op = OP_EQ;
    r2 = luaK_exp2anyreg(fs, e2);
  }
  freeexps(fs, e1, e2);
  e1->u.info = condjump(fs, op, r1, r2, isfloat, (opr == OPR_EQ));
  e1->k = VJMP;
}