remove error handling stuff from the VM

This commit is contained in:
Yuichi Nishiwaki 2014-03-24 15:12:01 +09:00
parent 1821039e78
commit f2717910d0
1 changed files with 0 additions and 21 deletions

View File

@ -500,7 +500,6 @@ pic_apply(pic_state *pic, struct pic_proc *proc, pic_value argv)
{ {
pic_code c; pic_code c;
int ai = pic_gc_arena_preserve(pic); int ai = pic_gc_arena_preserve(pic);
jmp_buf jmp, *prev_jmp = pic->jmp;
size_t argc, i; size_t argc, i;
pic_code boot[2]; pic_code boot[2];
@ -516,13 +515,6 @@ pic_apply(pic_state *pic, struct pic_proc *proc, pic_value argv)
}; };
#endif #endif
if (setjmp(jmp) == 0) {
pic->jmp = &jmp;
}
else {
goto L_RAISE;
}
if (! pic_list_p(argv)) { if (! pic_list_p(argv)) {
pic_error(pic, "argv must be a proper list"); pic_error(pic, "argv must be a proper list");
} }
@ -774,12 +766,6 @@ pic_apply(pic_state *pic, struct pic_proc *proc, pic_value argv)
pic_value *retv; pic_value *retv;
pic_callinfo *ci; pic_callinfo *ci;
if (pic->err) {
L_RAISE:
goto L_STOP;
}
if (pic->ci->env != NULL) { if (pic->ci->env != NULL) {
vm_tear_off(pic); vm_tear_off(pic);
} }
@ -919,7 +905,6 @@ pic_apply(pic_state *pic, struct pic_proc *proc, pic_value argv)
} \ } \
else { \ else { \
pic_error(pic, #op " got non-number operands"); \ pic_error(pic, #op " got non-number operands"); \
goto L_RAISE; \
} \ } \
NEXT; \ NEXT; \
} }
@ -931,14 +916,8 @@ pic_apply(pic_state *pic, struct pic_proc *proc, pic_value argv)
CASE(OP_STOP) { CASE(OP_STOP) {
pic_value val; pic_value val;
L_STOP:
val = POP(); val = POP();
pic->jmp = prev_jmp;
if (pic->err) {
pic_throw(pic, pic->err);
}
#if VM_DEBUG #if VM_DEBUG
puts("**VM END STATE**"); puts("**VM END STATE**");
printf("stbase\t= %p\nsp\t= %p\n", (void *)stbase, (void *)pic->sp); printf("stbase\t= %p\nsp\t= %p\n", (void *)stbase, (void *)pic->sp);