diff options
author | Andy Wingo <wingo@pobox.com> | 2009-07-24 12:06:19 +0200 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2009-07-24 12:06:19 +0200 |
commit | d95eb7f49f721306ffeb0020724093929cb0e206 (patch) | |
tree | 483f39292a5c44654f3f5e9e95c98035a1f1710a | |
parent | 51e9ba2f38675ce5fd161b7df15470abaaf60e0e (diff) | |
download | guile-d95eb7f49f721306ffeb0020724093929cb0e206.tar.gz |
fix gensym creation in psyntax
* 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.
-rw-r--r-- | module/ice-9/psyntax-pp.scm | 3 | ||||
-rw-r--r-- | module/ice-9/psyntax.scm | 6 |
2 files changed, 5 insertions, 4 deletions
diff --git a/module/ice-9/psyntax-pp.scm b/module/ice-9/psyntax-pp.scm index 113269b2e..de0db95de 100644 --- a/module/ice-9/psyntax-pp.scm +++ b/module/ice-9/psyntax-pp.scm @@ -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)) diff --git a/module/ice-9/psyntax.scm b/module/ice-9/psyntax.scm index f1f6e9ae0..6ecf24ee6 100644 --- a/module/ice-9/psyntax.scm +++ b/module/ice-9/psyntax.scm @@ -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 @@ -529,10 +529,10 @@ `(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)) |