- printf(") locals: %i + %i\n",
- prog->functions[i].firstlocal,
- prog->functions[i].locals);
+ if (opts_v > 1) {
+ int32_t start = prog->functions[i].entry;
+ if (start < 0)
+ printf(") builtin %i\n", (int)-start);
+ else {
+ size_t funsize = 0;
+ prog_section_statement *st = prog->code + start;
+ for (;st->opcode != INSTR_DONE; ++st)
+ ++funsize;
+ printf(") - %lu instructions", (unsigned long)funsize);
+ if (opts_v > 2) {
+ printf(" - locals: %i + %i\n",
+ prog->functions[i].firstlocal,
+ prog->functions[i].locals);
+ }
+ else
+ printf("\n");
+ }
+ }
+ else if (opts_v) {
+ printf(") locals: %i + %i\n",
+ prog->functions[i].firstlocal,
+ prog->functions[i].locals);
+ }
+ else
+ printf(")\n");