time when written at top level.
#| -*-Scheme-*-
-$Id: make.scm,v 14.78 2001/12/21 01:56:48 cph Exp $
+$Id: make.scm,v 14.79 2001/12/21 05:17:59 cph Exp $
Copyright (c) 1988-2001 Massachusetts Institute of Technology
names)
parent)
values))))
+
+(define environment-define-macro)
\f
(let ((environment-for-package
(*make-environment system-global-environment
(lambda arguments
(apply make-primitive-procedure arguments)))
+(define-syntax ucode-type
+ (lambda (name)
+ (microcode-type name)))
+
(define-integrable + (ucode-primitive integer-add))
(define-integrable - (ucode-primitive integer-subtract))
(define-integrable < (ucode-primitive integer-less?))
(define-integrable substring-move-right!
(ucode-primitive substring-move-right!))
+;; This definition is replaced later in the boot sequence.
+(set! environment-define-macro
+ (lambda (environment name transformer)
+ (local-assignment environment
+ name
+ ((ucode-primitive primitive-object-set-type)
+ (ucode-type reference-trap)
+ (cons 15 transformer)))))
+
(define microcode-identification (microcode-identify))
(define os-name-string (vector-ref microcode-identification 8))
(define tty-output-descriptor (tty-output-channel))
(RUNTIME SCODE-WALKER)
(RUNTIME CONTINUATION-PARSER)
(RUNTIME PROGRAM-COPIER)
+ (RUNTIME ENVIRONMENT)
;; Generic Procedures
((RUNTIME GENERIC-PROCEDURE EQHT) INITIALIZE-ADDRESS-HASHING! #t)
((RUNTIME GENERIC-PROCEDURE) INITIALIZE-GENERIC-PROCEDURES! #t)
#| -*-Scheme-*-
-$Id: runtime.pkg,v 14.398 2001/12/21 04:37:41 cph Exp $
+$Id: runtime.pkg,v 14.399 2001/12/21 05:18:12 cph Exp $
Copyright (c) 1988-2001 Massachusetts Institute of Technology
environment-bound-names
environment-bound?
environment-define
- environment-define-macro
+ ;; Defined in "make.scm":
+ ;; environment-define-macro
environment-has-parent?
environment-lambda
environment-lookup
ic-environment/arguments
ic-environment/procedure)
(export (runtime debugging-info)
- stack-frame/environment))
+ stack-frame/environment)
+ (initialization (initialize-package!)))
(define-package (runtime environment-inspector)
(files "where")
#| -*-Scheme-*-
-$Id: syntax.scm,v 14.46 2001/12/20 21:28:41 cph Exp $
+$Id: syntax.scm,v 14.47 2001/12/21 05:18:17 cph Exp $
Copyright (c) 1988-2001 Massachusetts Institute of Technology
(syntax-sequence top-level? body)))))
(define (syntax/define-syntax top-level? name value)
- top-level?
(if (not (symbol? name))
(syntax-error "illegal name" name))
- (syntax-table/define *syntax-table* name
- (syntax-eval (syntax-subexpression value)))
- name)
+ (syntax-table/define *syntax-table*
+ name
+ (syntax-eval (syntax-subexpression value)))
+ (if top-level?
+ (syntax-expression
+ top-level?
+ `((ACCESS ENVIRONMENT-DEFINE-MACRO #F) (THE-ENVIRONMENT) ',name ,value))
+ name))
(define-integrable (syntax-eval scode)
(extended-scode-eval scode syntaxer/default-environment))
#| -*-Scheme-*-
-$Id: uenvir.scm,v 14.48 2001/12/21 04:37:46 cph Exp $
+$Id: uenvir.scm,v 14.49 2001/12/21 05:18:22 cph Exp $
Copyright (c) 1988-1999, 2001 Massachusetts Institute of Technology
(declare (usual-integrations))
\f
+(define (initialize-package!)
+ ;; This variable is predefined in "make.scm" for the boot sequence.
+ ;; Otherwise it would be defined here.
+ (set! environment-define-macro real-environment-define-macro)
+ unspecific)
+
(define (environment? object)
(or (system-global-environment? object)
(ic-environment? object)
(else
(illegal-environment environment 'ENVIRONMENT-DEFINE))))
-(define (environment-define-macro environment name value)
- (cond ((interpreter-environment? environment)
- (interpreter-environment/define-macro environment name value))
- ((or (stack-ccenv? environment)
- (closure-ccenv? environment))
- (error:bad-range-argument environment 'ENVIRONMENT-DEFINE-MACRO))
- (else
- (illegal-environment environment 'ENVIRONMENT-DEFINE-MACRO))))
+(define real-environment-define-macro
+ (named-lambda (environment-define-macro environment name value)
+ (cond ((interpreter-environment? environment)
+ (interpreter-environment/define-macro environment name value))
+ ((or (stack-ccenv? environment)
+ (closure-ccenv? environment))
+ (error:bad-range-argument environment 'ENVIRONMENT-DEFINE-MACRO))
+ (else
+ (illegal-environment environment 'ENVIRONMENT-DEFINE-MACRO)))))
(define (illegal-environment object procedure)
(error:wrong-type-argument object "environment" procedure))
unspecific)
(define (interpreter-environment/define environment name value)
- (local-assignment environment name value)
- unspecific)
+ (local-assignment environment name value))
(define (interpreter-environment/define-macro environment name value)
- (local-assignment environment name (macro->unmapped-reference-trap value))
- unspecific)
+ (local-assignment environment name (macro->unmapped-reference-trap value)))
\f
(define (ic-environment/bound-names environment)
(map-ic-environment-bindings environment