| 159 | #define S(x) x,SS(x) |
| 160 | |
| 161 | static void PrintHeader(const Proto* f) |
| 162 | { |
| 163 | const char* s=getstr(f->source); |
| 164 | if (*s=='@' || *s=='=') |
| 165 | s++; |
| 166 | else if (*s==LUA_SIGNATURE[0]) |
| 167 | s="(bstring)"; |
| 168 | else |
| 169 | s="(string)"; |
| 170 | printf("\n%s <%s:%d,%d> (%d instruction%s, %d bytes at %p)\n", |
| 171 | (f->linedefined==0)?"main":"function",s, |
| 172 | f->linedefined,f->lastlinedefined, |
| 173 | S(f->sizecode),f->sizecode*Sizeof(Instruction),VOID(f)); |
| 174 | printf("%d%s param%s, %d slot%s, %d upvalue%s, ", |
| 175 | f->numparams,f->is_vararg?"+":"",SS(f->numparams), |
| 176 | S(f->maxstacksize),S(f->nups)); |
| 177 | printf("%d local%s, %d constant%s, %d function%s\n", |
| 178 | S(f->sizelocvars),S(f->sizek),S(f->sizep)); |
| 179 | } |
| 180 | |
| 181 | static void PrintConstants(const Proto* f) |
| 182 | { |
no outgoing calls