** adds a new prototype into list of prototypes */
| 696 | ** adds a new prototype into list of prototypes |
| 697 | */ |
| 698 | static Proto *addprototype (LexState *ls) { |
| 699 | Proto *clp; |
| 700 | lua_State *L = ls->L; |
| 701 | FuncState *fs = ls->fs; |
| 702 | Proto *f = fs->f; /* prototype of current function */ |
| 703 | if (fs->np >= f->sizep) { |
| 704 | int oldsize = f->sizep; |
| 705 | luaM_growvector(L, f->p, fs->np, f->sizep, Proto *, MAXARG_Bx, "functions"); |
| 706 | while (oldsize < f->sizep) |
| 707 | f->p[oldsize++] = NULL; |
| 708 | } |
| 709 | f->p[fs->np++] = clp = luaF_newproto(L); |
| 710 | luaC_objbarrier(L, f, clp); |
| 711 | return clp; |
| 712 | } |
| 713 | |
| 714 | |
| 715 | /* |