guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 07/10] pop-continuation abort-continuation hooks pass return


From: Ludovic Courtès
Subject: Re: [PATCH 07/10] pop-continuation abort-continuation hooks pass return vals directly
Date: Thu, 23 May 2013 23:46:07 +0200
User-agent: Gnus/5.130007 (Ma Gnus v0.7) Emacs/24.3 (gnu/linux)

Andy Wingo <address@hidden> skribis:

> * doc/ref/api-debug.texi (VM Hooks): Update documentation.
>
> * libguile/vm.c (vm_dispatch_hook):
> * libguile/vm-engine.c:  Rework the hook machinery so that they can
>   receive an arbitrary number of arguments.  The return and abort
>   hooks will pass the values that they return to their continuations.
>   (vm_engine): Adapt to ABORT_CONTINUATION_HOOK change.
>
> * libguile/vm-i-system.c (return, return/values): Adapt to
>   POP_CONTINUATION_HOOK change.
>
> * module/system/vm/frame.scm (frame-return-values): Remove.  The
>   pop-continuation-hook will pass the values directly.
>
> * module/system/vm/trace.scm (print-return):
>   (trace-calls-to-procedure):
>   (trace-calls-in-procedure): Update to receive return values
>   directly.
>
> * module/system/vm/traps.scm (trap-in-procedure)
>   (trap-in-dynamic-extent): Ignore return values.
>   (trap-frame-finish, trap-calls-in-dynamic-extent)
>   (trap-calls-to-procedure): Pass return values to the handlers.

OK.  Minor issues:

> --- a/doc/ref/api-debug.texi
> +++ b/doc/ref/api-debug.texi
> @@ -799,10 +799,11 @@ To digress, Guile's VM has 6 different hooks 
> (@pxref{Hooks}) that can be
>  fired at different times, which may be accessed with the following
>  procedures.
>  
> -All hooks are called with one argument, the frame in
> -question. @xref{Frames}.  Since these hooks may be fired very
> -frequently, Guile does a terrible thing: it allocates the frames on the
> -C stack instead of the garbage-collected heap.
> +The first argument of calls to these hooks is the frame in question.

> address@hidden {Scheme Procedure} vm-pop-continuation-hook vm
> address@hidden {Scheme Procedure} vm-pop-continuation-hook vm value ...

Remove “value ...”.

>  @deffn {Scheme Procedure} vm-abort-continuation-hook vm
>  The hook that will be called after aborting to a
> -prompt. @xref{Prompts}. The stack will be in the same state as for
> address@hidden
> +prompt.  @xref{Prompts}.
> +
> +Like the pop-continuation hook, this hook fires with a variable number
> +of arguments, corresponding to the values that the returned to the

s/the//

Ludo’.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]