| 667 | #define S(x) (int)(x),SS(x) |
| 668 | |
| 669 | static void PrintHeader(const Proto* f) |
| 670 | { |
| 671 | const char* s=f->source ? getstr(f->source) : "=?"; |
| 672 | if (*s=='@' || *s=='=') |
| 673 | s++; |
| 674 | else if (*s==LUA_SIGNATURE[0]) |
| 675 | s="(bstring)"; |
| 676 | else |
| 677 | s="(string)"; |
| 678 | printf("\n%s <%s:%d,%d> (%d instruction%s at %p)\n", |
| 679 | (f->linedefined==0)?"main":"function",s, |
| 680 | f->linedefined,f->lastlinedefined, |
| 681 | S(f->sizecode),VOID(f)); |
| 682 | printf("%d%s param%s, %d slot%s, %d upvalue%s, ", |
| 683 | (int)(f->numparams),f->is_vararg?"+":"",SS(f->numparams), |
| 684 | S(f->maxstacksize),S(f->sizeupvalues)); |
| 685 | printf("%d local%s, %d constant%s, %d function%s\n", |
| 686 | S(f->sizelocvars),S(f->sizek),S(f->sizep)); |
| 687 | } |
| 688 | |
| 689 | static void PrintDebug(const Proto* f) |
| 690 | { |
no test coverage detected