mirror of
https://github.com/CPunch/Cosmo.git
synced 2026-02-07 03:00:05 +00:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user