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;
|
||||
rp = init_rp; UNPARK;
|
||||
for (;;) {
|
||||
__try {
|
||||
for (;;) {
|
||||
next:
|
||||
w = *ip++;
|
||||
work:
|
||||
@ -59,4 +61,14 @@ work:
|
||||
#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