From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Newsgroups: gmane.lisp.guile.devel Subject: Re: [PATCH 07/10] pop-continuation abort-continuation hooks pass return vals directly Date: Thu, 23 May 2013 23:46:07 +0200 Message-ID: <87wqqpqsio.fsf@gnu.org> References: <1369315863-15879-1-git-send-email-wingo@pobox.com> <1369315863-15879-8-git-send-email-wingo@pobox.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1369345592 28708 80.91.229.3 (23 May 2013 21:46:32 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 23 May 2013 21:46:32 +0000 (UTC) To: guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Thu May 23 23:46:30 2013 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UfdLB-0006t7-6g for guile-devel@m.gmane.org; Thu, 23 May 2013 23:46:29 +0200 Original-Received: from localhost ([::1]:54637 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UfdLA-0002R9-SU for guile-devel@m.gmane.org; Thu, 23 May 2013 17:46:28 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:52046) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UfdL4-0002Oo-5U for guile-devel@gnu.org; Thu, 23 May 2013 17:46:26 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UfdL2-0000YV-8R for guile-devel@gnu.org; Thu, 23 May 2013 17:46:22 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:55426) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UfdL2-0000YC-1a for guile-devel@gnu.org; Thu, 23 May 2013 17:46:20 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1UfdL0-0006nB-AG for guile-devel@gnu.org; Thu, 23 May 2013 23:46:18 +0200 Original-Received: from reverse-83.fdn.fr ([80.67.176.83]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 23 May 2013 23:46:18 +0200 Original-Received: from ludo by reverse-83.fdn.fr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 23 May 2013 23:46:18 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 57 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: reverse-83.fdn.fr X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 4 Prairial an 221 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0xEA52ECF4 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 83C4 F8E5 10A3 3B4C 5BEA D15D 77DD 95E2 EA52 ECF4 X-OS: x86_64-unknown-linux-gnu User-Agent: Gnus/5.130007 (Ma Gnus v0.7) Emacs/24.3 (gnu/linux) Cancel-Lock: sha1:vI2FwIuJYCHNrHfGHyhR8fry1eg= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:16439 Archived-At: Andy Wingo 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. > -@deffn {Scheme Procedure} vm-pop-continuation-hook vm > +@deffn {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 > -@code{vm-pop-continuation-hook}. > +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’.