| 696 | } |
| 697 | |
| 698 | static void PrintDebug(const Proto* f) |
| 699 | { |
| 700 | int i,n; |
| 701 | n=f->sizek; |
| 702 | printf("constants (%d) for %p:\n",n,VOID(f)); |
| 703 | for (i=0; i<n; i++) |
| 704 | { |
| 705 | printf("\t%d\t",i); |
| 706 | PrintType(f,i); |
| 707 | PrintConstant(f,i); |
| 708 | printf("\n"); |
| 709 | } |
| 710 | n=f->sizelocvars; |
| 711 | printf("locals (%d) for %p:\n",n,VOID(f)); |
| 712 | for (i=0; i<n; i++) |
| 713 | { |
| 714 | printf("\t%d\t%s\t%d\t%d\n", |
| 715 | i,getstr(f->locvars[i].varname),f->locvars[i].startpc+1,f->locvars[i].endpc+1); |
| 716 | } |
| 717 | n=f->sizeupvalues; |
| 718 | printf("upvalues (%d) for %p:\n",n,VOID(f)); |
| 719 | for (i=0; i<n; i++) |
| 720 | { |
| 721 | printf("\t%d\t%s\t%d\t%d\n", |
| 722 | i,UPVALNAME(i),f->upvalues[i].instack,f->upvalues[i].idx); |
| 723 | } |
| 724 | } |
| 725 | |
| 726 | static void PrintFunction(const Proto* f, int full) |
| 727 | { |
no test coverage detected