fix gensym creation in psyntax
authorAndy Wingo <wingo@pobox.com>
Fri, 24 Jul 2009 10:06:19 +0000 (12:06 +0200)
committerAndy Wingo <wingo@pobox.com>
Fri, 24 Jul 2009 10:06:19 +0000 (12:06 +0200)
* module/ice-9/psyntax.scm (build-lexical-var): Make our gensyms really
  unique. Before, there was a chance that different lexicals could
  result in the same gensym.
* module/ice-9/psyntax-pp.scm: Regenerate.

module/ice-9/psyntax-pp.scm
module/ice-9/psyntax.scm

index 113269b..de0db95 100644 (file)
@@ -54,7 +54,8 @@
                (let ((id293 (if (syntax-object?99 id292)
                               (syntax-object-expression100 id292)
                               id292)))
-                 (gensym (symbol->string id293)))))
+                 (gensym
+                   (string-append (symbol->string id293) " ")))))
            (strip161
              (lambda (x294 w295)
                (if (memq (quote top) (wrap-marks118 w295))
index f1f6e9a..6ecf24e 100644 (file)
@@ -1,6 +1,6 @@
 ;;;; -*-scheme-*-
 ;;;;
-;;;;   Copyright (C) 2001, 2003, 2006 Free Software Foundation, Inc.
+;;;;   Copyright (C) 2001, 2003, 2006, 2009 Free Software Foundation, Inc.
 ;;;; 
 ;;;; This library is free software; you can redistribute it and/or
 ;;;; modify it under the terms of the GNU Lesser General Public
                  `(letrec ,(map list vars val-exps) ,body-exp)
                  src))))))
 
-;; FIXME: wingo: use make-lexical ?
+;; FIXME: use a faster gensym
 (define-syntax build-lexical-var
   (syntax-rules ()
-    ((_ src id) (gensym (symbol->string id)))))
+    ((_ src id) (gensym (string-append (symbol->string id) " ")))))
 
 (define-structure (syntax-object expression wrap module))