/* Code arithmetic operators ('+', '-', ...). If second operand is a constant in the proper range, use variant opcodes with K operands.  */
static void codearith(FuncState *fs, BinOpr opr, expdesc *e1, expdesc *e2, int flip, int line)
/* Code arithmetic operators ('+', '-', ...). If second operand is a constant in the proper range, use variant opcodes with K operands.  */
static void codearith(FuncState *fs, BinOpr opr, expdesc *e1, expdesc *e2, int flip, int line)
{
  TMS event = cast(TMS, opr + TM_ADD);
  if (tonumeral(e2, NULL) && luaK_exp2K(fs, e2)) {
    int v2 = e2->u.info;
    OpCode op = cast(OpCode, opr + OP_ADDK);
    finishbinexpval(fs, e1, e2, op, v2, flip, line, OP_MMBINK, event);
  }
  else {
    OpCode op = cast(OpCode, opr + OP_ADD);
    if (flip)
      swapexps(e1, e2);
    codebinexpval(fs, op, e1, e2, line);
  }
}