From 105c58ec8880db37f0216fac408624dd829b5c1b Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Tue, 12 Feb 2002 00:30:51 +0000 Subject: [PATCH] Implement REVERSE-SYNTACTIC-ENVIRONMENTS. Add bindings for SYSTEM-GLOBAL-SYNTAX-TABLE and EXTEND-IC-ENVIRONMENT to ease upgrading. --- v7/src/runtime/make.scm | 4 +++- v7/src/runtime/runtime.pkg | 4 +++- v7/src/runtime/syntactic-closures.scm | 9 +++++++-- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/v7/src/runtime/make.scm b/v7/src/runtime/make.scm index 8eee8d1d4..4867f029e 100644 --- a/v7/src/runtime/make.scm +++ b/v7/src/runtime/make.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: make.scm,v 14.84 2002/02/03 03:38:56 cph Exp $ +$Id: make.scm,v 14.85 2002/02/12 00:30:39 cph Exp $ Copyright (c) 1988-2002 Massachusetts Institute of Technology @@ -49,6 +49,8 @@ USA. val))))) (define system-global-environment #f) +;; This simplifies upgrading to new macros: +(define system-global-syntax-table system-global-environment) ;; *MAKE-ENVIRONMENT is referred to by compiled code. It must go ;; before the uses of the-environment later, and after apply above. diff --git a/v7/src/runtime/runtime.pkg b/v7/src/runtime/runtime.pkg index e3170f0da..0154b6349 100644 --- a/v7/src/runtime/runtime.pkg +++ b/v7/src/runtime/runtime.pkg @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: runtime.pkg,v 14.407 2002/02/03 03:38:56 cph Exp $ +$Id: runtime.pkg,v 14.408 2002/02/12 00:30:51 cph Exp $ Copyright (c) 1988-2002 Massachusetts Institute of Technology @@ -1322,6 +1322,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA environment-reference-type environment-safe-lookup environment? + (extend-ic-environment extend-interpreter-environment) extend-interpreter-environment guarantee-environment ic-environment? @@ -3759,6 +3760,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA parse-mit-lambda-list r4rs-lambda-list? sc-macro-transformer->expander + reverse-syntactic-environments rsc-macro-transformer->expander strip-syntactic-closures syntactic-closure-rtd diff --git a/v7/src/runtime/syntactic-closures.scm b/v7/src/runtime/syntactic-closures.scm index 0950939bc..1b8b050d9 100644 --- a/v7/src/runtime/syntactic-closures.scm +++ b/v7/src/runtime/syntactic-closures.scm @@ -1,6 +1,6 @@ ;;; -*-Scheme-*- ;;; -;;; $Id: syntactic-closures.scm,v 14.2 2002/02/08 17:31:58 cph Exp $ +;;; $Id: syntactic-closures.scm,v 14.3 2002/02/12 00:30:29 cph Exp $ ;;; ;;; Copyright (c) 1989-1991, 2001, 2002 Massachusetts Institute of Technology ;;; @@ -1181,4 +1181,9 @@ (define (make-name-generator) (let ((state (make-rename-state))) (lambda (identifier) - (rename-identifier identifier state)))) \ No newline at end of file + (rename-identifier identifier state)))) + +(define (reverse-syntactic-environments environment procedure) + (capture-syntactic-environment + (lambda (closing-environment) + (close-syntax (procedure closing-environment) environment)))) \ No newline at end of file -- 2.25.1