[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’.
- [PATCH 01/10] inline vm-engine.h into vm-engine.c, (continued)
- [PATCH 01/10] inline vm-engine.h into vm-engine.c, Andy Wingo, 2013/05/23
- [PATCH 03/10] minor vm-engine cleanups, Andy Wingo, 2013/05/23
- [PATCH 02/10] remove CONS macro in VM; use scm_cons instead, Andy Wingo, 2013/05/23
- [PATCH 04/10] remove some configurability in vm-engine, Andy Wingo, 2013/05/23
- [PATCH 05/10] vm-engine: remove register assignments, Andy Wingo, 2013/05/23
- [PATCH 06/10] Allow vm_engine caller to pass arguments on the stack., Andy Wingo, 2013/05/23
- [PATCH 08/10] cpp hygiene in the vm, Andy Wingo, 2013/05/23
- [PATCH 07/10] pop-continuation abort-continuation hooks pass return vals directly, Andy Wingo, 2013/05/23
- Re: [PATCH 07/10] pop-continuation abort-continuation hooks pass return vals directly,
Ludovic Courtès <=
- [PATCH 09/10] refactor to resolve_variable, Andy Wingo, 2013/05/23
- [PATCH 10/10] add new rtl vm, Andy Wingo, 2013/05/23