| 414 | } |
| 415 | |
| 416 | static void PrintDebug(const Proto* f) |
| 417 | { |
| 418 | int i,n; |
| 419 | n=f->sizek; |
| 420 | printf("constants (%d) for %p:\n",n,VOID(f)); |
| 421 | for (i=0; i<n; i++) |
| 422 | { |
| 423 | printf("\t%d\t",i+1); |
| 424 | PrintConstant(f,i); |
| 425 | printf("\n"); |
| 426 | } |
| 427 | n=f->sizelocvars; |
| 428 | printf("locals (%d) for %p:\n",n,VOID(f)); |
| 429 | for (i=0; i<n; i++) |
| 430 | { |
| 431 | printf("\t%d\t%s\t%d\t%d\n", |
| 432 | i,getstr(f->locvars[i].varname),f->locvars[i].startpc+1,f->locvars[i].endpc+1); |
| 433 | } |
| 434 | n=f->sizeupvalues; |
| 435 | printf("upvalues (%d) for %p:\n",n,VOID(f)); |
| 436 | for (i=0; i<n; i++) |
| 437 | { |
| 438 | printf("\t%d\t%s\t%d\t%d\n", |
| 439 | i,UPVALNAME(i),f->upvalues[i].instack,f->upvalues[i].idx); |
| 440 | } |
| 441 | } |
| 442 | |
| 443 | static void PrintFunction(const Proto* f, int full) |
| 444 | { |
no test coverage detected