From 2282dd3e922cbbfdd08f1c6826dfa851ef86eaeb Mon Sep 17 00:00:00 2001 From: Juan Jose Garcia Ripoll Date: Mon, 8 Jun 2009 20:03:02 +0200 Subject: [PATCH] Implement debug information also for compiled LET/LET* --- src/cmp/cmplet.lsp | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/src/cmp/cmplet.lsp b/src/cmp/cmplet.lsp index 5a958e81a..c33547003 100644 --- a/src/cmp/cmplet.lsp +++ b/src/cmp/cmplet.lsp @@ -231,7 +231,16 @@ (dolist (binding (nreverse bindings)) (bind (cdr binding) (car binding))) - (c2expr body) + (if (and *debug-fun* (>= *debug-fun* 3)) + (let ((*unwind-exit* *unwind-exit*)) + (wt-nl "{") + (let* ((env (build-debug-lexical-env vars))) + (when env (push 'IHS-ENV *unwind-exit*)) + (c2expr body) + (wt-nl "}") + (when env (pop-debug-lexical-env)))) + (c2expr body)) + (when block-p (wt-nl "}")) ) @@ -441,7 +450,15 @@ (c2expr* form))) ) ) - (c2expr body) + (if (and *debug-fun* (>= *debug-fun* 3)) + (let ((*unwind-exit* *unwind-exit*)) + (wt-nl "{") + (let* ((env (build-debug-lexical-env vars))) + (when env (push 'IHS-ENV *unwind-exit*)) + (c2expr body) + (wt-nl "}") + (when env (pop-debug-lexical-env)))) + (c2expr body)) (when block-p (wt-nl "}")) )