[Top][All Lists]

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

Re: Use of continuations in eval traps

From: Neil Jerram
Subject: Re: Use of continuations in eval traps
Date: Fri, 28 Oct 2005 22:18:50 +0100
User-agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux)

Mikael Djurfeldt <address@hidden> 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  <address@hidden>

        * 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

        * 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,


reply via email to

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