cs: support second argument to primitive-table
The two-argument mode is needed to support building RacketCs using RacketCS.
This commit is contained in:
parent
7797d3672b
commit
dbabafa147
|
@ -44,20 +44,26 @@
|
||||||
;; The expander needs various tables to set up primitive modules, and
|
;; The expander needs various tables to set up primitive modules, and
|
||||||
;; the `primitive-table` function is the bridge between worlds
|
;; the `primitive-table` function is the bridge between worlds
|
||||||
|
|
||||||
(define (primitive-table key)
|
(define user-installed-tables (make-hasheq))
|
||||||
(case key
|
|
||||||
[(|#%linklet|) linklet-table]
|
(define primitive-table
|
||||||
[(|#%kernel|) kernel-table]
|
(case-lambda
|
||||||
[(|#%read|) (make-hasheq)]
|
[(key)
|
||||||
[(|#%paramz|) paramz-table]
|
(case key
|
||||||
[(|#%unsafe|) unsafe-table]
|
[(|#%linklet|) linklet-table]
|
||||||
[(|#%foreign|) foreign-table]
|
[(|#%kernel|) kernel-table]
|
||||||
[(|#%futures|) futures-table]
|
[(|#%read|) (make-hasheq)]
|
||||||
[(|#%place|) place-table]
|
[(|#%paramz|) paramz-table]
|
||||||
[(|#%flfxnum|) flfxnum-table]
|
[(|#%unsafe|) unsafe-table]
|
||||||
[(|#%extfl|) extfl-table]
|
[(|#%foreign|) foreign-table]
|
||||||
[(|#%network|) network-table]
|
[(|#%futures|) futures-table]
|
||||||
[else #f]))
|
[(|#%place|) place-table]
|
||||||
|
[(|#%flfxnum|) flfxnum-table]
|
||||||
|
[(|#%extfl|) extfl-table]
|
||||||
|
[(|#%network|) network-table]
|
||||||
|
[else (hash-ref user-installed-tables key #f)])]
|
||||||
|
[(key table)
|
||||||
|
(hash-set! user-installed-tables key table)]))
|
||||||
|
|
||||||
(define-syntax define-primitive-table
|
(define-syntax define-primitive-table
|
||||||
(syntax-rules ()
|
(syntax-rules ()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user