summaryrefslogtreecommitdiff
path: root/module/system/base
diff options
context:
space:
mode:
authorMark H Weaver <mhw@netris.org>2016-02-12 11:19:38 -0500
committerLudovic Courtès <ludo@gnu.org>2017-03-07 20:48:40 +0100
commit84a740d86a5afd235f1b47ac66c88db010b1d56b (patch)
treefe593f3225cd79c7f3cd81c17925e989ca55d4fd /module/system/base
parent70cfabd7e87f93d210bad377feb7ca50fa3bd133 (diff)
psyntax: Generate identifiers in a deterministic fashion.
Fixes <http://bugs.gnu.org/20272>. * module/ice-9/boot-9.scm (module-generate-unique-id!) (module-gensym): New procedures. (module): Add 'next-unique-id' field. (the-root-module): Inherit 'next-unique-id' value from early stub. (make-module, make-autoload-interface): Adjust calls to module-constructor. * module/ice-9/psyntax.scm (gen-label, new-mark): Generate unique identifiers from the module name and the per-module unique-id. (build-lexical-var, generate-temporaries): Use 'module-gensym' instead of 'gensym'. * module/ice-9/psyntax-pp.scm: Regenerate. * module/language/tree-il/fix-letrec.scm (fix-letrec!): Use 'module-gensym' instead of 'gensym'. * module/system/base/syntax.scm (define-record): Likewise. (transform-record): Likewise. Co-authored-by: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'module/system/base')
-rw-r--r--module/system/base/syntax.scm8
1 files changed, 4 insertions, 4 deletions
diff --git a/module/system/base/syntax.scm b/module/system/base/syntax.scm
index fafcce40b..1cabbbcb7 100644
--- a/module/system/base/syntax.scm
+++ b/module/system/base/syntax.scm
@@ -1,6 +1,6 @@
;;; Guile VM specific syntaxes and utilities
-;; Copyright (C) 2001, 2009 Free Software Foundation, Inc
+;; Copyright (C) 2001, 2009, 2016 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
@@ -72,7 +72,7 @@
'()
(cons (car slots) (lp (cdr slots))))))
(opts (list-tail slots (length reqs)))
- (tail (gensym)))
+ (tail (module-gensym "defrec")))
`(define (,(symbol-append 'make- stem) ,@reqs . ,tail)
(let ,(map (lambda (o)
`(,(car o) (cond ((null? ,tail) ,(cadr o))
@@ -215,8 +215,8 @@
;; code looks good.
(define-macro (transform-record type-and-common record . clauses)
- (let ((r (gensym))
- (rtd (gensym))
+ (let ((r (module-gensym "rec"))
+ (rtd (module-gensym "rtd"))
(type-stem (trim-brackets (car type-and-common))))
(define (make-stem s)
(symbol-append type-stem '- s))