| 722 | |
| 723 | |
| 724 | static void codearith (FuncState *fs, OpCode op, |
| 725 | expdesc *e1, expdesc *e2, int line) { |
| 726 | if (constfolding(op, e1, e2)) |
| 727 | return; |
| 728 | else { |
| 729 | int o2 = (op != OP_UNM && op != OP_LEN) ? luaK_exp2RK(fs, e2) : 0; |
| 730 | int o1 = luaK_exp2RK(fs, e1); |
| 731 | if (o1 > o2) { |
| 732 | freeexp(fs, e1); |
| 733 | freeexp(fs, e2); |
| 734 | } |
| 735 | else { |
| 736 | freeexp(fs, e2); |
| 737 | freeexp(fs, e1); |
| 738 | } |
| 739 | e1->u.info = luaK_codeABC(fs, op, 0, o1, o2); |
| 740 | e1->k = VRELOCABLE; |
| 741 | luaK_fixline(fs, line); |
| 742 | } |
| 743 | } |
| 744 | |
| 745 | |
| 746 | static void codecomp (FuncState *fs, OpCode op, int cond, expdesc *e1, |
no test coverage detected