[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
"C_DEBUG_GLOBAL_ASSIGN" ',var)
- ,tmp)))))
+ `(##core#begin
+ (##core#debug-event
"C_DEBUG_GLOBAL_ASSIGN" ',var)
+ ,val)))))
(cond ((##sys#macro? var)
(warning
(sprintf "assigned global variable
`~S' is syntax ~A"
--
2.7.0.rc3
- [Chicken-hackers] [PATCH] Use begin to insert C_DEBUG_GLOBAL_ASSIGN events,
Evan Hanson <=