| 659 | |
| 660 | |
| 661 | static void codearith (FuncState *fs, OpCode op, expdesc *e1, expdesc *e2) { |
| 662 | if (constfolding(op, e1, e2)) |
| 663 | return; |
| 664 | else { |
| 665 | int o2 = (op != OP_UNM && op != OP_LEN) ? luaK_exp2RK(fs, e2) : 0; |
| 666 | int o1 = luaK_exp2RK(fs, e1); |
| 667 | if (o1 > o2) { |
| 668 | freeexp(fs, e1); |
| 669 | freeexp(fs, e2); |
| 670 | } |
| 671 | else { |
| 672 | freeexp(fs, e2); |
| 673 | freeexp(fs, e1); |
| 674 | } |
| 675 | e1->u.s.info = luaK_codeABC(fs, op, 0, o1, o2); |
| 676 | e1->k = VRELOCABLE; |
| 677 | } |
| 678 | } |
| 679 | |
| 680 | |
| 681 | static void codecomp (FuncState *fs, OpCode op, int cond, expdesc *e1, |
no test coverage detected