WIP: removed stale error handling

currently, scripts seem to run fine. however I'm a bit worried about stack related issues. maybe i'll need to reset state->top as well? but not entirely sure
This commit is contained in:
2023-08-29 14:07:45 -05:00
committed by cpunch
parent 75d27afe2c
commit 0633e87aa6
9 changed files with 79 additions and 130 deletions

View File

@@ -12,6 +12,7 @@ CPanic *cosmoV_newPanic(CState *state)
CPanic *panic = cosmoM_xmalloc(state, sizeof(CPanic));
panic->prev = state->panic;
state->panic = panic;
return panic;
}
@@ -19,6 +20,7 @@ void cosmoV_freePanic(CState *state)
{
CPanic *panic = state->panic;
state->panic = panic->prev;
cosmoM_free(state, CPanic, panic);
}
@@ -32,7 +34,6 @@ CState *cosmoV_newState()
exit(1);
}
state->panic = false;
state->freezeGC = 1; // we start frozen
state->panic = NULL;
@@ -50,8 +51,6 @@ CState *cosmoV_newState()
state->frameCount = 0;
state->openUpvalues = NULL;
state->error = NULL;
// set default proto objects
for (int i = 0; i < COBJ_MAX; i++)
state->protoObjects[i] = NULL;