www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit c627003c4b9afe885e1d078996f110f1ae1cfc39
parent 254f98d602ca232147966e06bdc567d60f848873
Author: Ryan Culpepper <ryanc@racket-lang.org>
Date:   Fri, 23 May 2008 16:56:41 +0000

macro stepper: workaround for occasional out-of-sync rename

svn: r9945

original commit: 1fcfc8a8e4f0bd26cc22e02642fe3ca08de0b173

Diffstat:
Mcollects/macro-debugger/model/reductions-config.ss | 29+++++++++++++++++++----------
1 file changed, 19 insertions(+), 10 deletions(-)

diff --git a/collects/macro-debugger/model/reductions-config.ss b/collects/macro-debugger/model/reductions-config.ss @@ -10,6 +10,10 @@ "context.ss" "steps.ss") +(define-syntax-rule (STRICT-CHECKS form ...) + (when #f + form ... (void))) + (define state/c (or/c state? false/c)) (define context/c any/c) (define big-context/c any/c) @@ -277,17 +281,22 @@ (loop (unbox from) (unbox to))] [(and (struct? from) (struct? to)) (loop (struct->vector from) (struct->vector to))] + [(eqv? from to) + (void)] [else - (unless (eqv? from to) - (fprintf (current-error-port) - "from:\n~e\n\nto:\n~e\n\n" - (stx->datum from) - (stx->datum to)) - (fprintf (current-error-port) - "original from:\n~e\n\noriginal to:\n~e\n\n" - (stx->datum from0) - (stx->datum to0)) - (error 'add-to-renames-table)) + ;; FIXME: bad rename indicates something out of sync + ;; But for now, just drop it to avoid macro stepper error. + ;; Only bad effect should be missed subterms (usually at phase1). + (STRICT-CHECKS + (fprintf (current-error-port) + "from:\n~e\n\nto:\n~e\n\n" + (stx->datum from) + (stx->datum to)) + (fprintf (current-error-port) + "original from:\n~e\n\noriginal to:\n~e\n\n" + (stx->datum from0) + (stx->datum to0)) + (error 'add-to-renames-table)) (void)]))) (define (compose-renames-mappings first second)