This repository was archived by the owner on Oct 26, 2023. It is now read-only.
File tree 3 files changed +25
-1
lines changed
pkgs/racket-test-core/tests/racket
3 files changed +25
-1
lines changed Original file line number Diff line number Diff line change 7147
7147
7148
7148
(test '(1 2 ) dynamic-require ''check-inline-of-set!-expression 'result )
7149
7149
7150
+ ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
7151
+ ;; Regression test for schemify cross-module inlining
7152
+
7153
+ (module modifies-its-exported-variable racket/base
7154
+ (provide (all-defined-out ))
7155
+ (define X '() )
7156
+ (define (change-X!)
7157
+ (set! X (cons 'shouldnt-be X))))
7158
+
7159
+ (module uses-imported-variable-before-modify racket/base
7160
+ (require 'modifies-its-exported-variable )
7161
+ (provide old-X)
7162
+ (define old-X
7163
+ (let ([copy-of-X X])
7164
+ (change-X!)
7165
+ copy-of-X)))
7166
+
7167
+ (test '() dynamic-require ''uses-imported-variable-before-modify 'old-X )
7168
+
7150
7169
;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
7151
7170
7152
7171
(report-errs)
Original file line number Diff line number Diff line change 14242
14242
c2_0)))
14243
14243
(if defn8_0
14244
14244
a-known-constant
14245
- (known-copy rhs_0))))))))
14245
+ (if (hash-ref imports12_0 u-rhs_0 #f)
14246
+ a-known-constant
14247
+ (known-copy rhs_0)))))))))
14246
14248
(if (parameter-result?
14247
14249
rhs_0
14248
14250
prim-knowns11_0
Original file line number Diff line number Diff line change 80
80
(known-copy rhs)]
81
81
[else known]))]
82
82
[defn a-known-constant]
83
+ [(hash-ref imports u-rhs #f )
84
+ ;; imported, but nothing known about it => could be mutable
85
+ a-known-constant]
83
86
[else (known-copy rhs)])]
84
87
[(parameter-result? rhs prim-knowns knowns mutated)
85
88
(known-procedure 3 )]
You can’t perform that action at this time.
0 commit comments