schemify: fix undefined checking when constants no enforced

Related to #3325
This commit is contained in:
Matthew Flatt 2020-10-05 08:33:10 -06:00
parent 4d8851d1be
commit 2a66eddcc9
3 changed files with 8 additions and 2 deletions

View File

@ -1029,6 +1029,12 @@
(err/rt-test (eval '(module m racket/base (define x 2) (provide x)))
exn:fail:contract:variable?)))
(parameterize ([current-namespace (make-base-namespace)])
(parameterize ([compile-enforce-module-constants #f])
(eval '(module m racket/base (eq? y y) (define y 2))))
(err/rt-test/once (eval '(dynamic-require ''m #f))
exn:fail:contract:variable?))
;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Check JIT treatement of seemingly constant imports

View File

@ -17438,7 +17438,7 @@
app_0
(if enforce-constant?_0
'not-ready
'set!ed)))
'set!ed-too-early)))
(for-loop_1 rest_1))))
(values)))))))
(for-loop_1 ids_0)))

View File

@ -42,7 +42,7 @@
'not-ready
;; If constants should not be enforced, then
;; treat all variable as mutated:
'set!ed)))]
'set!ed-too-early)))]
[`,_ (void)]))
;; Walk through the body:
(for/fold ([prev-knowns knowns]) ([form (in-list l)])