(define (car-constant? components)
(and (identifier=? environment (caar components)
- system-global-environment 'QUOTE)
+ (->syntactic-environment system-global-environment)
+ 'quote)
(bit-string? (cadar components))))
(define-integrable (car-constant-value constant)
(compile/expression self environment)
free-names
(compile/expression
- `(,(close-syntax 'BEGIN system-global-environment) ,@body)
+ `(,(close-syntax 'begin
+ (->syntactic-environment system-global-environment))
+ ,@body)
environment)))))))
(define-syntax ==>
(vector-ref (gc-space-status) 0))
env))
+ (if (unbound? env '->syntactic-environment)
+ (eval '(define (->syntactic-environment object)
+ object)
+ env))
+
(provide-rename 'random-bytevector 'random-byte-vector)
(provide-rename 'string-foldcase 'string-downcase)
(files "syntax-environment")
(parent (runtime syntax))
(export ()
+ ->syntactic-environment
syntactic-environment?)
(export (runtime syntax)
- ->syntactic-environment
make-internal-syntactic-environment
make-keyword-syntactic-environment
make-partial-syntactic-environment
(make-syntactic-closure senv '() form))
(define (make-syntactic-closure senv free form)
- (let ((senv (->syntactic-environment senv 'make-syntactic-closure)))
- (guarantee-list-of identifier? free 'make-syntactic-closure)
- (if (or (memq form free) ;LOOKUP-IDENTIFIER assumes this.
- (constant-form? form)
- (and (syntactic-closure? form)
- (null? (syntactic-closure-free form))))
- form
- (%make-syntactic-closure senv free form))))
+ (guarantee syntactic-environment? senv 'make-syntactic-closure)
+ (guarantee-list-of identifier? free 'make-syntactic-closure)
+ (if (or (memq form free) ;LOOKUP-IDENTIFIER assumes this.
+ (constant-form? form)
+ (and (syntactic-closure? form)
+ (null? (syntactic-closure-free form))))
+ form
+ (%make-syntactic-closure senv free form)))
(define (constant-form? form)
(not (or (syntactic-closure? form)
(lambda ()
(syntax* (if (null? declarations)
s-expressions
- (cons (cons (close-syntax 'DECLARE
- system-global-environment)
+ (cons (cons (close-syntax 'declare
+ (->syntactic-environment
+ system-global-environment))
declarations)
s-expressions))
environment))))