expander: fix variable-reference-constant? on primitive

When setting up the namespaces that imitate primitive instances,
the "constant" annotation wasn't set. The v6.x expander gets this
wrong, too, for different reasons.
This commit is contained in:
Matthew Flatt 2018-07-01 07:40:52 -06:00
parent d5bb22c2d9
commit 0f32765fe4
3 changed files with 7 additions and 2 deletions

View File

@ -154,6 +154,10 @@
(test (module-path-index-join ''#%unsafe #f)
variable-reference->module-path-index (#%variable-reference $$unsafe-fx+))
(test #t variable-reference-constant? (#%variable-reference cons))
(require (only-in ffi/unsafe _bool))
(test #t variable-reference-constant? (#%variable-reference _bool))
;; ----------------------------------------
(module phaser scheme/base

View File

@ -85,7 +85,7 @@
(lambda (data-box ns phase-shift phase-level self bulk-binding-registry insp)
(when (= 0 phase-level)
(for ([(sym val) (in-hash ht)])
(namespace-set-variable! ns 0 sym val)))))
(namespace-set-variable! ns 0 sym val #t)))))
(module-path-index-resolve mpi)))
(define (declare-reexporting-module! name require-names

View File

@ -58672,7 +58672,8 @@ static const char *startup_source =
" ns_123"
" 0"
" sym_104"
" val_84))"
" val_84"
" #t))"
"(values)))))"
"(values)))))"
"(if(not #f)"