| 4364 | |
| 4365 | |
| 4366 | void luaK_prefix (FuncState *fs, UnOpr op, expdesc *e) { |
| 4367 | expdesc e2; |
| 4368 | e2.t = e2.f = NO_JUMP; e2.k = VKNUM; e2.u.nval = 0; |
| 4369 | switch (op) { |
| 4370 | case OPR_MINUS: { |
| 4371 | if (!isnumeral(e)) |
| 4372 | luaK_exp2anyreg(fs, e); /* cannot operate on non-numeric constants */ |
| 4373 | codearith(fs, OP_UNM, e, &e2); |
| 4374 | break; |
| 4375 | } |
| 4376 | case OPR_NOT: codenot(fs, e); break; |
| 4377 | case OPR_LEN: { |
| 4378 | luaK_exp2anyreg(fs, e); /* cannot operate on constants */ |
| 4379 | codearith(fs, OP_LEN, e, &e2); |
| 4380 | break; |
| 4381 | } |
| 4382 | default: lua_assert(0); |
| 4383 | } |
| 4384 | } |
| 4385 | |
| 4386 | |
| 4387 | void luaK_infix (FuncState *fs, BinOpr op, expdesc *v) { |
no test coverage detected