Skip to content

Commit d1e760d

Browse files
committed
add stubs for continuation marks for bootstrapping the expander
1 parent 3cd352d commit d1e760d

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

s/reboot.ss

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -562,6 +562,27 @@
562562
(define $current-expand current-expand)
563563
(define current-expand (make-parameter #f))
564564

565+
(meta-cond
566+
[(top-level-bound? 'with-expand-time-environment) (begin)]
567+
[else
568+
;; The following stub is needed because the expander uses continuation
569+
;; marks to support the `property-value` procedure and older host
570+
;; Schemes do not support continuation marks. Bootstrapping the
571+
;; expander itself doesn't make use of `property-value` and, more
572+
;; generally, continuation marks, so these mock version suffice.
573+
;; Things have to be revisited once the Nanopass framework makes use
574+
;; of `property-value` (currently, the old, less convenient
575+
;; `lookup`-procedure protocol is used).
576+
(define-syntax with-expand-time-environment
577+
(syntax-rules ()
578+
[(_ r b) b]))
579+
(define (current-expand-time-environment) #f)
580+
(define-primitive ($call-consuming-continuation-attachment default-val p)
581+
(p #f))
582+
(define-primitive ($call-setting-continuation-attachment marks thunk)
583+
(thunk))
584+
(define-primitive ($update-mark marks k v) marks)])
585+
565586
;; End of "primitives" here ^^ ----------------------------------------
566587

567588
(define (noisy-load s)

0 commit comments

Comments
 (0)