mirror of
https://github.com/CPunch/Cosmo.git
synced 2024-11-24 00:00:17 +00:00
capture freezeGC in CPanic
This commit is contained in:
parent
ffff01e9d1
commit
6701a63a63
@ -12,6 +12,7 @@ CPanic *cosmoV_newPanic(CState *state)
|
|||||||
CPanic *panic = cosmoM_xmalloc(state, sizeof(CPanic));
|
CPanic *panic = cosmoM_xmalloc(state, sizeof(CPanic));
|
||||||
panic->top = state->top;
|
panic->top = state->top;
|
||||||
panic->frameCount = state->frameCount;
|
panic->frameCount = state->frameCount;
|
||||||
|
panic->freezeGC = state->freezeGC;
|
||||||
panic->prev = state->panic;
|
panic->prev = state->panic;
|
||||||
state->panic = panic;
|
state->panic = panic;
|
||||||
|
|
||||||
|
@ -46,6 +46,7 @@ typedef struct CPanic
|
|||||||
StkPtr top;
|
StkPtr top;
|
||||||
struct CPanic *prev;
|
struct CPanic *prev;
|
||||||
int frameCount;
|
int frameCount;
|
||||||
|
int freezeGC;
|
||||||
} CPanic;
|
} CPanic;
|
||||||
|
|
||||||
struct CState
|
struct CState
|
||||||
|
@ -122,6 +122,7 @@ void cosmoV_throw(CState *state)
|
|||||||
if (state->panic) {
|
if (state->panic) {
|
||||||
state->top = state->panic->top;
|
state->top = state->panic->top;
|
||||||
state->frameCount = state->panic->frameCount;
|
state->frameCount = state->panic->frameCount;
|
||||||
|
state->freezeGC = state->panic->freezeGC;
|
||||||
cosmoV_pushValue(state, val);
|
cosmoV_pushValue(state, val);
|
||||||
longjmp(state->panic->jmp, 1);
|
longjmp(state->panic->jmp, 1);
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user