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