Adding exception handling for windows.
This commit is contained in:
@ -47,6 +47,8 @@ static cell_t *forth_run(cell_t *init_rp) {
|
|||||||
register float *fp, ft;
|
register float *fp, ft;
|
||||||
rp = init_rp; UNPARK;
|
rp = init_rp; UNPARK;
|
||||||
for (;;) {
|
for (;;) {
|
||||||
|
__try {
|
||||||
|
for (;;) {
|
||||||
next:
|
next:
|
||||||
w = *ip++;
|
w = *ip++;
|
||||||
work:
|
work:
|
||||||
@ -59,4 +61,14 @@ work:
|
|||||||
#undef Z
|
#undef Z
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} __except (1) {
|
||||||
|
rp = *g_sys->throw_handler;
|
||||||
|
*g_sys->throw_handler = (cell_t *) *rp--;
|
||||||
|
sp = (cell_t *) *rp--;
|
||||||
|
fp = (float *) *rp--;
|
||||||
|
ip = (cell_t *) *rp--;
|
||||||
|
--sp;
|
||||||
|
tos = GetExceptionCode();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user