From 385049949aa52b8578334d073b2c63291a5d5274 Mon Sep 17 00:00:00 2001 From: Andy Wingo Date: Tue, 25 Jun 2013 21:53:52 +0200 Subject: [PATCH] abort-to-prompt* instead of @abort * libguile/control.h: * libguile/control.c (scm_abort_to_prompt_star): Rename from scm_at_abort. * module/ice-9/boot-9.scm (abort-to-prompt): Use abort-to-prompt*. * module/language/tree-il/primitives.scm: Handle abort-to-prompt* instead of @abort. --- libguile/control.c | 10 ++++++---- libguile/control.h | 4 ++-- module/ice-9/boot-9.scm | 2 +- module/language/tree-il/primitives.scm | 8 +++++--- 4 files changed, 14 insertions(+), 10 deletions(-) diff --git a/libguile/control.c b/libguile/control.c index 54c1cd3f4..3f2651c6b 100644 --- a/libguile/control.c +++ b/libguile/control.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2010, 2011, 2012 Free Software Foundation, Inc. +/* Copyright (C) 2010, 2011, 2012, 2013 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License @@ -223,9 +223,11 @@ scm_c_abort (SCM vm, SCM tag, size_t n, SCM *argv, abort (); } -SCM_DEFINE (scm_at_abort, "@abort", 2, 0, 0, (SCM tag, SCM args), - "Abort to the nearest prompt with tag @var{tag}.") -#define FUNC_NAME s_scm_at_abort +SCM_DEFINE (scm_abort_to_prompt_star, "abort-to-prompt*", 2, 0, 0, + (SCM tag, SCM args), + "Abort to the nearest prompt with tag @var{tag}, yielding the\n" + "values in the list, @var{args}.") +#define FUNC_NAME s_scm_abort_to_prompt_star { SCM *argv; size_t i; diff --git a/libguile/control.h b/libguile/control.h index 470919472..db383cf63 100644 --- a/libguile/control.h +++ b/libguile/control.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2010, 2011, 2012 Free Software Foundation, Inc. +/* Copyright (C) 2010, 2011, 2012, 2013 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License @@ -24,7 +24,7 @@ SCM_INTERNAL SCM scm_i_prompt_pop_abort_args_x (SCM vm); SCM_INTERNAL void scm_c_abort (SCM vm, SCM tag, size_t n, SCM *argv, scm_i_jmp_buf *registers) SCM_NORETURN; -SCM_INTERNAL SCM scm_at_abort (SCM tag, SCM args) SCM_NORETURN; +SCM_INTERNAL SCM scm_abort_to_prompt_star (SCM tag, SCM args) SCM_NORETURN; SCM_INTERNAL void scm_init_control (void); diff --git a/module/ice-9/boot-9.scm b/module/ice-9/boot-9.scm index f1fd04124..82a0875cf 100644 --- a/module/ice-9/boot-9.scm +++ b/module/ice-9/boot-9.scm @@ -64,7 +64,7 @@ (define (call-with-prompt tag thunk handler) (@prompt tag (thunk) handler)) (define (abort-to-prompt tag . args) - (@abort tag args)) + (abort-to-prompt* tag args)) ;; Define catch and with-throw-handler, using some common helper routines and a diff --git a/module/language/tree-il/primitives.scm b/module/language/tree-il/primitives.scm index 4a1b98da9..6e578aab4 100644 --- a/module/language/tree-il/primitives.scm +++ b/module/language/tree-il/primitives.scm @@ -77,7 +77,8 @@ fluid-ref fluid-set! - @prompt call-with-prompt @abort abort-to-prompt + @prompt call-with-prompt + abort-to-prompt* abort-to-prompt make-prompt-tag throw error scm-error @@ -186,7 +187,8 @@ dynamic-wind @dynamic-wind values - @prompt call-with-prompt @abort abort-to-prompt)) + @prompt call-with-prompt + @abort abort-to-prompt)) ;; Procedures that cause a nonlocal, non-resumable abort. (define *bailout-primitives* @@ -623,7 +625,7 @@ (else #f))) (hashq-set! *primitive-expand-table* - '@abort + 'abort-to-prompt* (case-lambda ((src tag tail-args) (make-abort src tag '() tail-args)) -- 2.20.1