optimizer: remove incorrect assertion
This commit is contained in:
parent
9cb8c8fdd9
commit
a71d87c5a9
|
@ -5974,6 +5974,24 @@
|
|||
[#:pull* 'pull]
|
||||
[_ 'err])))
|
||||
|
||||
|
||||
;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; At the time of its addition, this example causes the
|
||||
;; optimizer to initially use the `random-configuration`
|
||||
;; variable, instead of substituting `(unknown)`, because it
|
||||
;; can't provide that the substitution is ok --- but later it
|
||||
;; learns enough to decide the the substitution is ok after
|
||||
;; all
|
||||
|
||||
(module optimizer-decides-to-inline-once-use-after-all racket/base
|
||||
(define unknown #f)
|
||||
(set! unknown unknown)
|
||||
(define (generate-samples)
|
||||
(define random-configuration (unknown))
|
||||
(for ([i 0])
|
||||
(for ([s (in-list 'obviously-not-a-list)])
|
||||
(unknown random-configuration)))))
|
||||
|
||||
;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
(report-errs)
|
||||
|
|
|
@ -7229,13 +7229,14 @@ static void flip_transitive(Scheme_Hash_Table *ht, int on)
|
|||
tvar = SCHEME_VAR(ht->keys[j]);
|
||||
if (on) {
|
||||
if (tvar->optimize_used) {
|
||||
/* use of `tvar` is no longer dependent on anohter variable */
|
||||
/* use of `tvar` is no longer dependent on another variable */
|
||||
to_remove = scheme_make_pair((Scheme_Object *)tvar,
|
||||
to_remove);
|
||||
} else
|
||||
tvar->optimize_used = 1;
|
||||
} else {
|
||||
MZ_ASSERT(tvar->optimize_used);
|
||||
/* It's possible that `tvar->optimize_used` is already 0; a variable
|
||||
is sometimes tenatively marked as used, and then unmarked */
|
||||
tvar->optimize_used = 0;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user