[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-hackers] [PATCH] Use begin to insert C_DEBUG_GLOBAL_ASSIGN
Re: [Chicken-hackers] [PATCH] Use begin to insert C_DEBUG_GLOBAL_ASSIGN events
Sat, 5 Mar 2016 13:46:45 +0100
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?
Description: Digital signature