mirror of
https://github.com/CPunch/Cosmo.git
synced 2026-02-06 10:50:04 +00:00
cosmoV_throw() now resets the vm stack as well
also a minor GC bug in cosmoO_newError was fixed. i'm going to try to phase out cosmoM_freezeGC & friends since that would cause hell with this new error handling solution. the only thing still using it is the GC.
This commit is contained in:
@@ -10,6 +10,8 @@
|
||||
CPanic *cosmoV_newPanic(CState *state)
|
||||
{
|
||||
CPanic *panic = cosmoM_xmalloc(state, sizeof(CPanic));
|
||||
panic->top = state->top;
|
||||
panic->frameCount = state->frameCount;
|
||||
panic->prev = state->panic;
|
||||
state->panic = panic;
|
||||
|
||||
@@ -95,7 +97,6 @@ void cosmoV_freeState(CState *state)
|
||||
#ifdef GC_DEBUG
|
||||
printf("state %p is being free'd!\n", state);
|
||||
#endif
|
||||
cosmoM_freezeGC(state);
|
||||
|
||||
// frees all the objects
|
||||
CObj *objs = state->objects;
|
||||
|
||||
Reference in New Issue
Block a user