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