don't perform longjmp in pic_load_point (for the symmetry)

This commit is contained in:
Yuichi Nishiwaki 2014-09-24 20:27:16 +09:00
parent d6c6427ff7
commit a6d2491338
2 changed files with 4 additions and 4 deletions

6
cont.c
View File

@ -73,7 +73,7 @@ pic_save_point(pic_state *pic, struct pic_escape *escape)
escape->results = pic_undef_value(); escape->results = pic_undef_value();
} }
noreturn void void
pic_load_point(pic_state *pic, struct pic_escape *escape) pic_load_point(pic_state *pic, struct pic_escape *escape)
{ {
if (! escape->valid) { if (! escape->valid) {
@ -91,8 +91,6 @@ pic_load_point(pic_state *pic, struct pic_escape *escape)
pic->ip = escape->ip; pic->ip = escape->ip;
escape->valid = false; escape->valid = false;
longjmp(escape->jmp, 1);
} }
noreturn static pic_value noreturn static pic_value
@ -107,6 +105,8 @@ escape_call(pic_state *pic)
e = pic_data_ptr(pic_attr_ref(pic, pic_get_proc(pic), "@@escape")); e = pic_data_ptr(pic_attr_ref(pic, pic_get_proc(pic), "@@escape"));
pic_load_point(pic, e->data); pic_load_point(pic, e->data);
longjmp(((struct pic_escape *)e->data)->jmp, 1);
} }
struct pic_proc * struct pic_proc *

View File

@ -27,7 +27,7 @@ struct pic_escape {
}; };
void pic_save_point(pic_state *, struct pic_escape *); void pic_save_point(pic_state *, struct pic_escape *);
noreturn void pic_load_point(pic_state *, struct pic_escape *); void pic_load_point(pic_state *, struct pic_escape *);
struct pic_proc *pic_make_econt(pic_state *, struct pic_escape *); struct pic_proc *pic_make_econt(pic_state *, struct pic_escape *);