From 4d56ebf6346a7844178379b94bcbc66d628276a5 Mon Sep 17 00:00:00 2001 From: Yuichi Nishiwaki Date: Mon, 24 Mar 2014 14:52:52 +0900 Subject: [PATCH] drop support for raise-continuable for a moment --- include/picrin/error.h | 2 -- src/error.c | 27 --------------------------- 2 files changed, 29 deletions(-) diff --git a/include/picrin/error.h b/include/picrin/error.h index ffc0dfed..cebc85e1 100644 --- a/include/picrin/error.h +++ b/include/picrin/error.h @@ -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 diff --git a/src/error.c b/src/error.c index 1f68afa1..1c620019 100644 --- a/src/error.c +++ b/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);