From 621109a40aef62ad04b2b6e5f1c4b6551f880443 Mon Sep 17 00:00:00 2001 From: Robby Findler Date: Mon, 12 Sep 2011 20:48:11 -0500 Subject: [PATCH] =?UTF-8?q?adjust=20check=20syntax=20to=20use=20the=20new?= =?UTF-8?q?=20capability=20in=20free-identifier=3D=3F?= --- .../drracket/private/syncheck/traversals.rkt | 29 +------------------ 1 file changed, 1 insertion(+), 28 deletions(-) diff --git a/collects/drracket/private/syncheck/traversals.rkt b/collects/drracket/private/syncheck/traversals.rkt index ce9f23b5e7..8ba4c0eae4 100644 --- a/collects/drracket/private/syncheck/traversals.rkt +++ b/collects/drracket/private/syncheck/traversals.rkt @@ -161,7 +161,7 @@ #%plain-app #%top #%plain-module-begin define-values define-syntaxes begin-for-syntax module #%require #%provide #%expression) - (λ (x y) (free-identifier=?/phases x level y 0)) + (λ (x y) (free-identifier=? x y level 0)) [(#%plain-lambda args bodies ...) (begin (annotate-raw-keyword sexp varrefs) @@ -382,33 +382,6 @@ (void))]))) (add-tail-ht-links tail-ht))) - ;; free-identifier=?/phases : id phase-level id phase-level -> boolean - ;; Determines whether x has the same binding at phase-level phase-x - ;; that y has at phase-level y. - ;; At least one of the identifiers MUST have a binding (module or lexical) - (define (free-identifier=?/phases x phase-x y phase-y) - (cond [(eqv? phase-x phase-y) - (free-identifier=? x y phase-x)] - [else - (let ([bx (identifier-binding x phase-x)] - [by (identifier-binding y phase-y)]) - (cond [(and (pair? bx) (pair? by)) - (let ([mpix (first bx)] - [namex (second bx)] - [defphasex (fifth bx)] - [mpiy (first by)] - [namey (second by)] - [defphasey (fifth by)]) - (and (eq? namex namey) - ;; resolved-module-paths are interned - (eq? (module-path-index-resolve mpix) - (module-path-index-resolve mpiy)) - (eqv? defphasex defphasey)))] - [else - ;; Module is only way to get phase-shift; phases differ, so - ;; if not module-bound names, no way can refer to same binding. - #f]))])) - (define (hash-cons! ht k v) (hash-set! ht k (cons v (hash-ref ht k '()))))