mirror of
https://github.com/CPunch/Cosmo.git
synced 2026-02-06 02:40:03 +00:00
cdebug: added cosmoG_disassemble
for now cosmo will disassemble each script before running
This commit is contained in:
1
main.c
1
main.c
@@ -50,6 +50,7 @@ static bool interpret(CState *state, const char *script, const char *mod)
|
||||
|
||||
// cosmoV_compileString pushes the result onto the stack (COBJ_ERROR or COBJ_CLOSURE)
|
||||
if (cosmoV_compileString(state, script, mod)) {
|
||||
cosmoG_disassemble(cosmoV_readClosure(*cosmoV_getTop(state, 0)));
|
||||
if (!cosmoV_pcall(state, 0, 1)) {
|
||||
cosmoV_printBacktrace(state, cosmoV_readError(*cosmoV_pop(state)));
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user