Added backtrace via --trace option and a lot more helpful information for debugging. (0.22.0)
This commit is contained in:
parent
9ac42c6ed1
commit
bd51aea318
8 changed files with 129 additions and 11 deletions
|
|
@ -17,6 +17,8 @@ Bytecode *bytecode_new(void) {
|
|||
bc->instr_count = 0;
|
||||
bc->constants = NULL;
|
||||
bc->const_count = 0;
|
||||
bc->name = NULL;
|
||||
bc->source_file = NULL;
|
||||
return bc;
|
||||
}
|
||||
|
||||
|
|
@ -46,6 +48,8 @@ void bytecode_free(Bytecode *bc) {
|
|||
}
|
||||
free(bc->constants);
|
||||
free(bc->instructions);
|
||||
if (bc->name) free((void*)bc->name);
|
||||
if (bc->source_file) free((void*)bc->source_file);
|
||||
free(bc);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue