From 3e94a20ce48e6e53e2e2182d82f95eb0365d82a4 Mon Sep 17 00:00:00 2001 From: Stephen Adams Date: Thu, 15 Jun 1995 17:59:59 +0000 Subject: [PATCH] Tracking of reqrite for DBG info generation. --- v8/src/compiler/midend/cleanup.scm | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/v8/src/compiler/midend/cleanup.scm b/v8/src/compiler/midend/cleanup.scm index 1e900bb7b..512675c2f 100644 --- a/v8/src/compiler/midend/cleanup.scm +++ b/v8/src/compiler/midend/cleanup.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: cleanup.scm,v 1.18 1995/05/11 05:39:59 adams Exp $ +$Id: cleanup.scm,v 1.19 1995/06/15 17:59:59 adams Exp $ Copyright (c) 1994-1995 Massachusetts Institute of Technology @@ -481,6 +481,11 @@ MIT in each case. |# (car binding) (cleanup/expr env (cadr binding)))) bindings))) + (define (dbg-track! bindings) + (for-each (lambda (binding) + (dbg-info/remember (cleanup/binding/name binding) + (form/copy (cleanup/binding/value binding)))) + bindings)) (call-with-values (lambda () (list-split bindings* @@ -516,6 +521,8 @@ MIT in each case. |# (car triplet) `(LOOKUP ,(cadr triplet)))) complex-triplets)))) + (dbg-track! trivial) + (dbg-track! easy) (let ((body* (cleanup/expr env* body))) (if (null? complex-triplets) body* @@ -605,13 +612,14 @@ MIT in each case. |# (map (lambda (name) (let ((value (cleanup/env/lookup name env))) ;; Do not rename if the shadowed binding is disappearing - (if (or (not value) - (QUOTE/? value)) - (cleanup/binding/make name `(LOOKUP ,name)) - (let ((renamed-form - `(LOOKUP ,(variable/rename name)))) - (dbg-info/remember name renamed-form) - (cleanup/binding/make name renamed-form))))) + (cond ((or (not value) + (QUOTE/? value)) + (cleanup/binding/make name `(LOOKUP ,name))) + (else + (let ((renamed-form + `(LOOKUP ,(variable/rename name)))) + (dbg-info/remember name renamed-form) + (cleanup/binding/make name renamed-form)))))) names)) ;; Environment is a list of frames. Frames are a list of bindings. -- 2.25.1