From: Chris Hanson Date: Thu, 1 Feb 2018 07:00:26 +0000 (-0800) Subject: Don't use syntactic enviroment to indirectly bind global macros. X-Git-Tag: mit-scheme-pucked-x11-0.3.1~7^2~282 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=6b6e3aefe7680fb5a87f1b08353afd82cf1ed4af;p=mit-scheme.git Don't use syntactic enviroment to indirectly bind global macros. --- diff --git a/src/runtime/syntax-definitions.scm b/src/runtime/syntax-definitions.scm index 8631e26e4..5a3120afd 100644 --- a/src/runtime/syntax-definitions.scm +++ b/src/runtime/syntax-definitions.scm @@ -29,35 +29,33 @@ USA. (declare (usual-integrations)) -(define (initialize-package!) - (create-bindings (->syntactic-environment system-global-environment))) - -(define (create-bindings senv) - - (define (def name item) - (bind-keyword senv name item)) - - (define (define-classifier name classifier) - (def name (classifier-item classifier))) - - (define-classifier 'BEGIN classifier:begin) - (define-classifier 'DECLARE classifier:declare) - (define-classifier 'DEFINE-SYNTAX classifier:define-syntax) - (define-classifier 'ER-MACRO-TRANSFORMER classifier:er-macro-transformer) - (define-classifier 'LET-SYNTAX classifier:let-syntax) - (define-classifier 'LETREC-SYNTAX classifier:letrec-syntax) - (define-classifier 'RSC-MACRO-TRANSFORMER classifier:rsc-macro-transformer) - (define-classifier 'SC-MACRO-TRANSFORMER classifier:sc-macro-transformer) - - (define (define-compiler name compiler) - (def name (compiler-item compiler))) - - (define-compiler 'DELAY compiler:delay) - (define-compiler 'IF compiler:if) - (define-compiler 'LAMBDA compiler:lambda) - (define-compiler 'NAMED-LAMBDA compiler:named-lambda) - (define-compiler 'OR compiler:or) - (define-compiler 'QUOTE compiler:quote) - (define-compiler 'quote-identifier compiler:quote-identifier) - (define-compiler 'SET! compiler:set!) - (define-compiler 'THE-ENVIRONMENT compiler:the-environment)) \ No newline at end of file +(add-boot-init! + (lambda () + + (define (def name item) + (environment-define-macro system-global-environment name item)) + + (define (define-classifier name classifier) + (def name (classifier-item classifier))) + + (define-classifier 'BEGIN classifier:begin) + (define-classifier 'DECLARE classifier:declare) + (define-classifier 'DEFINE-SYNTAX classifier:define-syntax) + (define-classifier 'ER-MACRO-TRANSFORMER classifier:er-macro-transformer) + (define-classifier 'LET-SYNTAX classifier:let-syntax) + (define-classifier 'LETREC-SYNTAX classifier:letrec-syntax) + (define-classifier 'RSC-MACRO-TRANSFORMER classifier:rsc-macro-transformer) + (define-classifier 'SC-MACRO-TRANSFORMER classifier:sc-macro-transformer) + + (define (define-compiler name compiler) + (def name (compiler-item compiler))) + + (define-compiler 'DELAY compiler:delay) + (define-compiler 'IF compiler:if) + (define-compiler 'LAMBDA compiler:lambda) + (define-compiler 'NAMED-LAMBDA compiler:named-lambda) + (define-compiler 'OR compiler:or) + (define-compiler 'QUOTE compiler:quote) + (define-compiler 'quote-identifier compiler:quote-identifier) + (define-compiler 'SET! compiler:set!) + (define-compiler 'THE-ENVIRONMENT compiler:the-environment))) \ No newline at end of file