| 10062 | } |
| 10063 | |
| 10064 | static Proto* LoadFunction(LoadState* S, TString* p) |
| 10065 | { |
| 10066 | Proto* f; |
| 10067 | if (++S->L->nCcalls > LUAI_MAXCCALLS) error(S,"code too deep"); |
| 10068 | f=luaF_newproto(S->L); |
| 10069 | setptvalue2s(S->L,S->L->top,f); incr_top(S->L); |
| 10070 | f->source=LoadString(S); if (f->source==NULL) f->source=p; |
| 10071 | f->linedefined=LoadInt(S); |
| 10072 | f->lastlinedefined=LoadInt(S); |
| 10073 | f->nups=LoadByte(S); |
| 10074 | f->numparams=LoadByte(S); |
| 10075 | f->is_vararg=LoadByte(S); |
| 10076 | f->maxstacksize=LoadByte(S); |
| 10077 | LoadCode(S,f); |
| 10078 | LoadConstants(S,f); |
| 10079 | LoadDebug(S,f); |
| 10080 | IF (!luaG_checkcode(f), "bad code"); |
| 10081 | S->L->top--; |
| 10082 | S->L->nCcalls--; |
| 10083 | return f; |
| 10084 | } |
| 10085 | |
| 10086 | static void LoadHeader(LoadState* S) |
| 10087 | { |
no test coverage detected