'cref/object-root
#!default))
+(let ((env (->environment '(runtime))))
+ (if (not (environment-bound? env 'define-deferred-procedure))
+ (eval '(define-syntax define-deferred-procedure
+ (er-macro-transformer
+ (lambda (form rename compare)
+ (declare (ignore compare))
+ (syntax-check '(_ identifier expression expression) form)
+ (let ((name (cadr form))
+ (dependency (caddr form))
+ (expr (cadddr form))
+ (args (new-identifier 'args)))
+ `(,(rename 'begin)
+ (,(rename 'define) ,name
+ (,(rename 'lambda) ,args
+ (,(rename 'defer-boot-action) ,dependency
+ (,(rename 'lambda) ()
+ (,(rename 'apply) ,name ,args)))))
+ (,(rename 'defer-boot-action) ,dependency
+ (,(rename 'lambda) ()
+ (,(rename 'set!) ,name ,expr)
+ ,(rename 'unspecific))))))))
+ env)))
(let ((env (->environment '(scode-optimizer expansion))))
(,(rename 'set!) ,name ,value)
,(rename 'unspecific))))))))
+(define-syntax define-deferred-procedure
+ (er-macro-transformer
+ (lambda (form rename compare)
+ (declare (ignore compare))
+ (syntax-check '(_ identifier expression expression) form)
+ (let ((name (cadr form))
+ (dependency (caddr form))
+ (expr (cadddr form))
+ (args (new-identifier 'args)))
+ `(,(rename 'begin)
+ (,(rename 'define) ,name
+ (,(rename 'lambda) ,args
+ (,(rename 'defer-boot-action) ,dependency
+ (,(rename 'lambda) ()
+ (,(rename 'apply) ,name ,args)))))
+ (,(rename 'defer-boot-action) ,dependency
+ (,(rename 'lambda) ()
+ (,(rename 'set!) ,name ,expr)
+ ,(rename 'unspecific))))))))
+
(define-syntax select-on-bytes-per-word
(er-macro-transformer
(lambda (form rename compare)