1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-09 21:40:33 +02:00

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.
This commit is contained in:
Andy Wingo 2009-07-24 12:06:19 +02:00
parent 51e9ba2f38
commit d95eb7f49f
2 changed files with 5 additions and 4 deletions

View 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))

View 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
@ -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))