[Top][All Lists]

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

Re: [Chicken-hackers] [PATCH] Use begin to insert C_DEBUG_GLOBAL_ASSIGN

From: Peter Bex
Subject: Re: [Chicken-hackers] [PATCH] Use begin to insert C_DEBUG_GLOBAL_ASSIGN events
Date: Sat, 5 Mar 2016 13:46:45 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

On Fri, Mar 04, 2016 at 08:43:51AM +1300, Evan Hanson wrote:
> Using a let binding causes a different "dest" to be used for the
> assigned value's node, which (for procedures) means the emitted
> C_DEBUG_ENTRY event uses a temporary name rather than the procedure's
> real name. Using a "##core#begin" instead preserves the assigned name.

Doesn't this change the semantics by emitting a debug event _before_
the value is calculated?

If the calculation has side-effects (or fails due to an exception), the
set! won't be executed, so I think the original version is better, as
you wouldn't get the debugger event.  In your patch, the debugger event
would be triggered and *then* the exception would trigger, which would be
confusing, as the assignment never really happened.

What's exactly the problem you're trying to solve here?  I don't see
anything that messes with "var", so the debugger event should show the
correct name of the assigned global, no?


Attachment: signature.asc
Description: Digital signature

reply via email to

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