** Emit code for binary expressions that "produce values" ** (everything but logical operators 'and'/'or' and comparison ** operators). ** Expression to produce final result will be encoded in 'e1'. */
| 1486 | ** Expression to produce final result will be encoded in 'e1'. |
| 1487 | */ |
| 1488 | static void finishbinexpval (FuncState *fs, expdesc *e1, expdesc *e2, |
| 1489 | OpCode op, int v2, int flip, int line, |
| 1490 | OpCode mmop, TMS event) { |
| 1491 | int v1 = luaK_exp2anyreg(fs, e1); |
| 1492 | int pc = luaK_codeABCk(fs, op, 0, v1, v2, 0); |
| 1493 | freeexps(fs, e1, e2); |
| 1494 | e1->u.info = pc; |
| 1495 | e1->k = VRELOC; /* all those operations are relocatable */ |
| 1496 | luaK_fixline(fs, line); |
| 1497 | luaK_codeABCk(fs, mmop, v1, v2, cast_int(event), flip); /* metamethod */ |
| 1498 | luaK_fixline(fs, line); |
| 1499 | } |
| 1500 | |
| 1501 | |
| 1502 | /* |
no test coverage detected