drop support for raise-continuable for a moment
This commit is contained in:
parent
042bd30415
commit
4d56ebf634
|
@ -46,8 +46,6 @@ struct pic_error {
|
|||
#define pic_error_p(v) (pic_type(v) == PIC_TT_ERROR)
|
||||
#define pic_error_ptr(v) ((struct pic_error *)pic_ptr(v))
|
||||
|
||||
pic_value pic_raise_continuable(pic_state *, pic_value);
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
|
27
src/error.c
27
src/error.c
|
@ -119,22 +119,6 @@ pic_raise(pic_state *pic, struct pic_error *e)
|
|||
pic_errorf(pic, "handler returned", 2, pic_obj_value(handler), a);
|
||||
}
|
||||
|
||||
pic_value
|
||||
pic_raise_continuable(pic_state *pic, pic_value obj)
|
||||
{
|
||||
struct pic_proc *handler;
|
||||
|
||||
if (pic->ridx == 0) {
|
||||
pic_abort(pic, "logic flaw: no exception handler remains");
|
||||
}
|
||||
|
||||
handler = pic->rescue[--pic->ridx];
|
||||
obj = pic_apply_argv(pic, handler, 1, obj);
|
||||
pic->rescue[pic->ridx++] = handler;
|
||||
|
||||
return obj;
|
||||
}
|
||||
|
||||
static pic_value
|
||||
pic_error_with_exception_handler(pic_state *pic)
|
||||
{
|
||||
|
@ -175,16 +159,6 @@ pic_error_raise(pic_state *pic)
|
|||
pic_raise(pic, e);
|
||||
}
|
||||
|
||||
static pic_value
|
||||
pic_error_raise_continuable(pic_state *pic)
|
||||
{
|
||||
pic_value obj;
|
||||
|
||||
pic_get_args(pic, "o", &obj);
|
||||
|
||||
return pic_raise_continuable(pic, obj);
|
||||
}
|
||||
|
||||
noreturn static pic_value
|
||||
pic_error_error(pic_state *pic)
|
||||
{
|
||||
|
@ -270,7 +244,6 @@ pic_init_error(pic_state *pic)
|
|||
{
|
||||
pic_defun(pic, "with-exception-handler", pic_error_with_exception_handler);
|
||||
pic_defun(pic, "raise", pic_error_raise);
|
||||
pic_defun(pic, "raise-continuable", pic_error_raise_continuable);
|
||||
pic_defun(pic, "error", pic_error_error);
|
||||
pic_defun(pic, "error-object?", pic_error_error_object_p);
|
||||
pic_defun(pic, "error-object-message", pic_error_error_object_message);
|
||||
|
|
Loading…
Reference in New Issue