| 3702 | |
| 3703 | |
| 3704 | void luaK_nil (FuncState *fs, int from, int n) { |
| 3705 | Instruction *previous; |
| 3706 | if (fs->pc > fs->lasttarget) { /* no jumps to current position? */ |
| 3707 | if (fs->pc == 0) { /* function start? */ |
| 3708 | if (from >= fs->nactvar) |
| 3709 | return; /* positions are already clean */ |
| 3710 | } |
| 3711 | else { |
| 3712 | previous = &fs->f->code[fs->pc-1]; |
| 3713 | if (GET_OPCODE(*previous) == OP_LOADNIL) { |
| 3714 | int pfrom = GETARG_A(*previous); |
| 3715 | int pto = GETARG_B(*previous); |
| 3716 | if (pfrom <= from && from <= pto+1) { /* can connect both? */ |
| 3717 | if (from+n-1 > pto) |
| 3718 | SETARG_B(*previous, from+n-1); |
| 3719 | return; |
| 3720 | } |
| 3721 | } |
| 3722 | } |
| 3723 | } |
| 3724 | luaK_codeABC(fs, OP_LOADNIL, from, from+n-1, 0); /* else no optimization */ |
| 3725 | } |
| 3726 | |
| 3727 | |
| 3728 | int luaK_jump (FuncState *fs) { |
no test coverage detected