From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Neil Jerram Newsgroups: gmane.lisp.guile.devel Subject: Re: Use of continuations in eval traps Date: Fri, 28 Oct 2005 22:18:50 +0100 Message-ID: <87hdb19w79.fsf@ossau.uklinux.net> References: <878xwdbhc9.fsf@ossau.uklinux.net> <66e540fe0510281354m2eb93928p17aa82de7b1a4d5f@mail.gmail.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1130534410 5226 80.91.229.2 (28 Oct 2005 21:20:10 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 28 Oct 2005 21:20:10 +0000 (UTC) Cc: Guile Development Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Fri Oct 28 23:20:08 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EVbcq-0003Tt-B0 for guile-devel@m.gmane.org; Fri, 28 Oct 2005 23:19:00 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EVbcp-00018W-QI for guile-devel@m.gmane.org; Fri, 28 Oct 2005 17:18:59 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EVbcn-00018R-BH for guile-devel@gnu.org; Fri, 28 Oct 2005 17:18:57 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EVbcl-00017g-Sr for guile-devel@gnu.org; Fri, 28 Oct 2005 17:18:57 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EVbcl-00017b-6G for guile-devel@gnu.org; Fri, 28 Oct 2005 17:18:55 -0400 Original-Received: from [80.84.72.33] (helo=mail3.uklinux.net) by monty-python.gnu.org with esmtp (Exim 4.34) id 1EVbcl-0002CK-3T for guile-devel@gnu.org; Fri, 28 Oct 2005 17:18:55 -0400 Original-Received: from laruns (host81-130-88-151.in-addr.btopenworld.com [81.130.88.151]) by mail3.uklinux.net (Postfix) with ESMTP id 62AC1409FB2; Fri, 28 Oct 2005 21:18:54 +0000 (UTC) Original-Received: from laruns (laruns [127.0.0.1]) by laruns (Postfix) with ESMTP id B2E626F718; Fri, 28 Oct 2005 22:18:50 +0100 (BST) Original-To: djurfeldt@nada.kth.se In-Reply-To: <66e540fe0510281354m2eb93928p17aa82de7b1a4d5f@mail.gmail.com> (Mikael Djurfeldt's message of "Fri, 28 Oct 2005 22:54:08 +0200") User-Agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux) X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:5363 Archived-At: Mikael Djurfeldt writes: > You are probably more competent to answer the question than me. :-) Well thanks for your quick response anyway; it's very helpful. > I wrote that code when I was pretty inexperienced, and the choice to > allow for the continuation to be saved was probably more motivated by > a feeling that I didn't want any limitations on what you could do with > traps than anything more specific---except that I probably had > imagined the continuations as a way to resume execution after a > breakpoint, of course. Oh yes, I remember now; continuations have not been necessary for continuing after a breakpoint since this change to call the trap handlers directly instead of executing a throw: 2001-06-26 Neil Jerram * eval.h, eval.c (scm_call_4): New function. * eval.c (SCM_APPLY, SCM_CEVAL, ENTER_APPLY): Call trap handlers directly rather than dispatching to them via scm_ithrow and a lazy catch. * eval.c (scm_evaluator_trap_table), eval.h (SCM_ENTER_FRAME_HDLR, SCM_APPLY_FRAME_HDLR, SCM_EXIT_FRAME_HDLR): Add three new options for trap handler procedures. * debug.h (SCM_RESET_DEBUG_MODE): Add checks for trap handler procedures not being #f. (I hope I didn't miss anything by making this change ... I think I checked it with you at the time also.) > I agree that it seems expensive to create the continuation at every > trap, and your idea to skip the cheaptraps option and delegate the > decision whether to create the continuation or not to the lazy handler > code (I assume) seems good. Cool, I'll give it a go and see what turns out. > BTW, your work on the debugger and Emacs interface seems really great---thanks! Thanks again, Neil _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://lists.gnu.org/mailman/listinfo/guile-devel