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