Use CLOSE-SYNTAX where possible.
authorChris Hanson <org/chris-hanson/cph>
Sat, 9 Feb 2002 05:43:15 +0000 (05:43 +0000)
committerChris Hanson <org/chris-hanson/cph>
Sat, 9 Feb 2002 05:43:15 +0000 (05:43 +0000)
v7/src/compiler/base/macros.scm
v7/src/edwin/clsmac.scm
v7/src/runtime/defstr.scm
v7/src/sf/toplev.scm
v7/src/sos/macros.scm

index f70b5ad3157668776eba2d17ce5f6ecf908e0d40..cb24f62c6b59c0139fe0fe5e0738049db38f7246 100644 (file)
@@ -1,6 +1,6 @@
 #| -*-Scheme-*-
 
-$Id: macros.scm,v 4.25 2002/02/08 03:55:01 cph Exp $
+$Id: macros.scm,v 4.26 2002/02/09 05:43:15 cph Exp $
 
 Copyright (c) 1988-1999, 2001, 2002 Massachusetts Institute of Technology
 
@@ -43,25 +43,25 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
      (if (syntax-match? '((* IDENTIFIER) * EXPRESSION) (cdr form))
         (let ((names (cadr form))
               (body (cddr form)))
-          `(,(make-syntactic-closure environment '() 'BEGIN)
+          `(,(close-syntax 'BEGIN environment)
             ,@(map (let ((r-define
-                          (make-syntactic-closure environment '() 'DEFINE)))
+                          (close-syntax 'DEFINE environment)))
                      (lambda (name)
                        `(,r-define ,name)))
                    names)
-            (,(make-syntactic-closure environment '() 'LET) () ,@body)))
+            (,(close-syntax 'LET environment) () ,@body)))
         (ill-formed-syntax form)))))
 
 (define-syntax define-export
   (rsc-macro-transformer
    (lambda (form environment)
      (cond ((syntax-match? '(IDENTIFIER EXPRESSION) (cdr form))
-           `(,(make-syntactic-closure environment '() 'SET!)
+           `(,(close-syntax 'SET! environment)
              ,@(cdr form)))
           ((syntax-match? '((IDENTIFIER . MIT-BVL) + EXPRESSION) (cdr form))
-           `(,(make-syntactic-closure environment '() 'SET!)
+           `(,(close-syntax 'SET! environment)
              ,(caadr form)
-             (,(make-syntactic-closure environment '() 'NAMED-LAMBDA)
+             (,(close-syntax 'NAMED-LAMBDA environment)
               ,@(cdr form))))
           (else
            (ill-formed-syntax form))))))
index 3c5ceb9ff6b2bc4774f3dd45c8620e9906228bcf..24df02fb9117964ed802168e4b69fff2c1d9f861 100644 (file)
@@ -1,6 +1,6 @@
 ;;; -*-Scheme-*-
 ;;;
-;;; $Id: clsmac.scm,v 1.8 2002/02/03 03:38:54 cph Exp $
+;;; $Id: clsmac.scm,v 1.9 2002/02/09 05:37:59 cph Exp $
 ;;;
 ;;; Copyright (c) 1986, 1989, 1999, 2001, 2002 Massachusetts Institute of Technology
 ;;;
@@ -44,9 +44,9 @@
                            (name->class (identifier->symbol superclass)))
                       variables)
           ;; Load-time definition.
-          `(,(make-syntactic-closure environment '() 'DEFINE)
+          `(,(close-syntax 'DEFINE environment)
             ,name
-            (,(make-syntactic-closure environment '() 'MAKE-CLASS)
+            (,(close-syntax 'MAKE-CLASS environment)
              ',(identifier->symbol name)
              ,superclass
              ',variables)))
@@ -57,7 +57,7 @@
    (lambda (form environment)
      (let ((finish
            (lambda (name operation expression)
-             `(,(make-syntactic-closure environment '() 'CLASS-METHOD-DEFINE)
+             `(,(close-syntax 'CLASS-METHOD-DEFINE environment)
                ,name
                ',operation
                ,expression))))
                   (identifier? (cadr (caddr form))))
              (finish (cadr form)
                      (car (caddr form))
-                     `(,(make-syntactic-closure environment '() 'NAMED-LAMBDA)
+                     `(,(close-syntax 'NAMED-LAMBDA environment)
                        ,(caddr form)
-                       (,(make-syntactic-closure environment '()
-                           'WITH-INSTANCE-VARIABLES)
+                       (,(close-syntax 'WITH-INSTANCE-VARIABLES environment)
                         ,(cadr form)
                         ,(cadr (caddr form))
                         ()
@@ -96,8 +95,7 @@
             (compile/subexpression self environment history select-caddr)
             free-names
             (compile/subexpression
-             `(,(make-syntactic-closure system-global-environment '() 'BEGIN)
-               ,@body)
+             `(,(close-syntax 'BEGIN system-global-environment) ,@body)
              environment
              history
              select-cddddr)))
index 65ff84945e423e1d2ca2c45730186a5d7df1d510..d64deb18d64ce451a43515e7ba012da25f76f27d 100644 (file)
@@ -1,6 +1,6 @@
 #| -*-Scheme-*-
 
-$Id: defstr.scm,v 14.38 2002/02/03 03:38:55 cph Exp $
+$Id: defstr.scm,v 14.39 2002/02/09 05:40:39 cph Exp $
 
 Copyright (c) 1988-1999, 2001, 2002 Massachusetts Institute of Technology
 
@@ -303,7 +303,7 @@ differences:
   (close (parser-context/name context) context))
 
 (define (close name context)
-  (make-syntactic-closure (parser-context/environment context) '() name))
+  (close-syntax name (parser-context/environment context)))
 \f
 (define (apply-option-transformers options context)
   (let loop ((options options))
@@ -679,8 +679,8 @@ differences:
 ;;;; Code Generation
 
 (define (absolute name context)
-  (make-syntactic-closure (parser-context/closing-environment context) '()
-    `(ACCESS ,name #F)))
+  (close-syntax `(ACCESS ,name #F)
+               (parser-context/closing-environment context)))
 
 (define (accessor-definitions structure)
   (let ((context (structure/context structure)))
index a91019caf52b78af147cb32cf36671fd37c3cc04..6cde7489e5c9b6468bd9a2294179b5feddf8b2ae 100644 (file)
@@ -1,6 +1,6 @@
 #| -*-Scheme-*-
 
-$Id: toplev.scm,v 4.23 2002/02/03 03:38:58 cph Exp $
+$Id: toplev.scm,v 4.24 2002/02/09 05:41:31 cph Exp $
 
 Copyright (c) 1988-2002 Massachusetts Institute of Technology
 
@@ -270,9 +270,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
   (mark-phase "Syntax")
   (syntax* (if (null? declarations)
               s-expressions
-              (cons (cons (make-syntactic-closure system-global-environment
-                              '()
-                            'DECLARE)
+              (cons (cons (close-syntax 'DECLARE system-global-environment)
                           declarations)
                     s-expressions))
           environment))
index 1dd96f11e5612501fcf5405242ed0ade20956d1b..ffda5878b51f0039e889c83f79487e66e9cffd83 100644 (file)
@@ -1,6 +1,6 @@
 ;;; -*-Scheme-*-
 ;;;
-;;; $Id: macros.scm,v 1.13 2002/02/03 03:38:58 cph Exp $
+;;; $Id: macros.scm,v 1.14 2002/02/09 05:42:02 cph Exp $
 ;;;
 ;;; Copyright (c) 1993-2002 Massachusetts Institute of Technology
 ;;;
                   body))))
        (values body
                (let ((l
-                      (syntax `(,(make-syntactic-closure environment '()
-                                   'LAMBDA)
+                      (syntax `(,(close-syntax 'LAMBDA environment)
                                 (CALL-NEXT-METHOD)
                                 ,@body)
                               instance-environment)))