[Top][All Lists]

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

[Chicken-hackers] [PATCH] Use begin to insert C_DEBUG_GLOBAL_ASSIGN even

From: Evan Hanson
Subject: [Chicken-hackers] [PATCH] Use begin to insert C_DEBUG_GLOBAL_ASSIGN events
Date: Fri, 4 Mar 2016 08:43:51 +1300

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.
 compiler.scm | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/compiler.scm b/compiler.scm
index 301dcfe..b7e66c7 100644
--- a/compiler.scm
+++ b/compiler.scm
@@ -983,9 +983,9 @@
                                    (when emit-debug-info
                                      (let ((tmp (gensym)))
                                        (set! val
-                                         `(let ((,tmp ,val))
-                                            (##core#debug-event 
-                                            ,tmp)))))
+                                         `(##core#begin
+                                           (##core#debug-event 
+                                           ,val)))))
                                  (cond ((##sys#macro? var)
                                          (sprintf "assigned global variable 
`~S' is syntax ~A"

reply via email to

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