** Create an entry for the goto and the code for it. As it is not known ** at this point whether the goto may need a CLOSE, the code has a jump ** followed by an CLOSE. (As the CLOSE comes after the jump, it is a ** dead instruction; it works as a placeholder.) When the goto is closed ** against a label, if it needs a CLOSE, the two instructions swap ** positions, so that the CLOSE comes before th
| 661 | ** positions, so that the CLOSE comes before the jump. |
| 662 | */ |
| 663 | static int newgotoentry (LexState *ls, TString *name, int line) { |
| 664 | FuncState *fs = ls->fs; |
| 665 | int pc = luaK_jump(fs); /* create jump */ |
| 666 | luaK_codeABC(fs, OP_CLOSE, 0, 1, 0); /* spaceholder, marked as dead */ |
| 667 | return newlabelentry(ls, &ls->dyd->gt, name, line, pc); |
| 668 | } |
| 669 | |
| 670 | |
| 671 | /* |
no test coverage detected