| 687 | |
| 688 | |
| 689 | void luaK_prefix (FuncState *fs, UnOpr op, expdesc *e) { |
| 690 | expdesc e2; |
| 691 | e2.t = e2.f = NO_JUMP; e2.k = VKNUM; e2.u.nval = 0; |
| 692 | switch (op) { |
| 693 | case OPR_MINUS: { |
| 694 | if (!isnumeral(e)) |
| 695 | luaK_exp2anyreg(fs, e); /* cannot operate on non-numeric constants */ |
| 696 | codearith(fs, OP_UNM, e, &e2); |
| 697 | break; |
| 698 | } |
| 699 | case OPR_NOT: codenot(fs, e); break; |
| 700 | case OPR_LEN: { |
| 701 | luaK_exp2anyreg(fs, e); /* cannot operate on constants */ |
| 702 | codearith(fs, OP_LEN, e, &e2); |
| 703 | break; |
| 704 | } |
| 705 | default: lua_assert(0); |
| 706 | } |
| 707 | } |
| 708 | |
| 709 | |
| 710 | void luaK_infix (FuncState *fs, BinOpr op, expdesc *v) { |
no test coverage detected