** Emit code for binary expressions that "produce values" over ** two registers. */
| 1422 | ** two registers. |
| 1423 | */ |
| 1424 | static void codebinexpval (FuncState *fs, BinOpr opr, |
| 1425 | expdesc *e1, expdesc *e2, int line) { |
| 1426 | OpCode op = binopr2op(opr, OPR_ADD, OP_ADD); |
| 1427 | int v2 = luaK_exp2anyreg(fs, e2); /* make sure 'e2' is in a register */ |
| 1428 | /* 'e1' must be already in a register or it is a constant */ |
| 1429 | lua_assert((VNIL <= e1->k && e1->k <= VKSTR) || |
| 1430 | e1->k == VNONRELOC || e1->k == VRELOC); |
| 1431 | lua_assert(OP_ADD <= op && op <= OP_SHR); |
| 1432 | finishbinexpval(fs, e1, e2, op, v2, 0, line, OP_MMBIN, binopr2TM(opr)); |
| 1433 | } |
| 1434 | |
| 1435 | |
| 1436 | /* |
no test coverage detected