| 396 | } |
| 397 | |
| 398 | static void PrintDebug(const Proto* f) |
| 399 | { |
| 400 | int i,n; |
| 401 | n=f->sizek; |
| 402 | printf("constants (%d) for %p:\n",n,VOID(f)); |
| 403 | for (i=0; i<n; i++) |
| 404 | { |
| 405 | printf("\t%d\t",i+1); |
| 406 | PrintConstant(f,i); |
| 407 | printf("\n"); |
| 408 | } |
| 409 | n=f->sizelocvars; |
| 410 | printf("locals (%d) for %p:\n",n,VOID(f)); |
| 411 | for (i=0; i<n; i++) |
| 412 | { |
| 413 | printf("\t%d\t%s\t%d\t%d\n", |
| 414 | i,getstr(f->locvars[i].varname),f->locvars[i].startpc+1,f->locvars[i].endpc+1); |
| 415 | } |
| 416 | n=f->sizeupvalues; |
| 417 | printf("upvalues (%d) for %p:\n",n,VOID(f)); |
| 418 | for (i=0; i<n; i++) |
| 419 | { |
| 420 | printf("\t%d\t%s\t%d\t%d\n", |
| 421 | i,UPVALNAME(i),f->upvalues[i].instack,f->upvalues[i].idx); |
| 422 | } |
| 423 | } |
| 424 | |
| 425 | static void PrintFunction(const Proto* f, int full) |
| 426 | { |
no test coverage detected