- util_debug("GEN", " {.entry =% 5d, .firstlocal =% 5d, .locals =% 5d, .profile =% 5d, .name =% 5d, .file =% 5d, .nargs =% 5d, .argsize =%0X }\n",
- code_functions_data[i].entry,
- code_functions_data[i].firstlocal,
- code_functions_data[i].locals,
- code_functions_data[i].profile,
- code_functions_data[i].name,
- code_functions_data[i].file,
- code_functions_data[i].nargs,
- *((int32_t*)&code_functions_data[i].argsize)
- );
+ size_t j = code_functions_data[i].entry;
+ util_debug("GEN", " {.entry =% 5d, .firstlocal =% 5d, .locals =% 5d, .profile =% 5d, .name =% 5d, .file =% 5d, .nargs =% 5d, .argsize =%0X }\n",
+ code_functions_data[i].entry,
+ code_functions_data[i].firstlocal,
+ code_functions_data[i].locals,
+ code_functions_data[i].profile,
+ code_functions_data[i].name,
+ code_functions_data[i].file,
+ code_functions_data[i].nargs,
+ *((int32_t*)&code_functions_data[i].argsize)
+ );
+ util_debug("GEN", " NAME: %s\n", &code_chars_data[code_functions_data[i].name]);
+ /* Internal functions have no code */
+ if (code_functions_data[i].entry >= 0) {
+ util_debug("GEN", " CODE:\n");
+ for (;;) {
+ if (code_statements_data[j].opcode != INSTR_DONE &&
+ code_statements_data[j].opcode != INSTR_RETURN)
+ util_debug("GEN", " %s {0x%05d,0x%05d,0x%05d}\n",
+ asm_instr[code_statements_data[j].opcode].m,
+ code_statements_data[j].o1.s1,
+ code_statements_data[j].o2.s2,
+ code_statements_data[j].o3.s3
+ );
+ else break;
+ j++;
+ }
+ }