Fix continuation mark chaperones
Failed to redirect correctly on `continuation-mark-set-first` when the mark set argument was #f.
This commit is contained in:
parent
4ead534227
commit
948e898406
|
@ -4350,6 +4350,25 @@
|
||||||
(with-continuation-mark mark (lambda (x) (+ x 1))
|
(with-continuation-mark mark (lambda (x) (+ x 1))
|
||||||
(do-mark mark))))
|
(do-mark mark))))
|
||||||
|
|
||||||
|
(test/pos-blame
|
||||||
|
'continuation-mark-key/c-ho-10
|
||||||
|
'(let* ([mark (make-continuation-mark-key)]
|
||||||
|
[ctc-mark (contract (continuation-mark-key/c number?)
|
||||||
|
mark
|
||||||
|
'pos
|
||||||
|
'neg)])
|
||||||
|
(with-continuation-mark mark "not a number"
|
||||||
|
(+ 1 (continuation-mark-set-first #f ctc-mark)))))
|
||||||
|
|
||||||
|
(test/spec-passed
|
||||||
|
'continuation-mark-key/c-ho-11
|
||||||
|
'(let* ([mark (make-continuation-mark-key)]
|
||||||
|
[ctc-mark (contract (continuation-mark-key/c number?)
|
||||||
|
mark
|
||||||
|
'pos
|
||||||
|
'neg)])
|
||||||
|
(continuation-mark-set-first #f ctc-mark)))
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
;;
|
;;
|
||||||
;; make-contract
|
;; make-contract
|
||||||
|
|
|
@ -7889,6 +7889,9 @@ scheme_extract_one_cc_mark_with_meta(Scheme_Object *mark_set, Scheme_Object *key
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (key_arg != key && val != NULL)
|
||||||
|
val = scheme_chaperone_do_continuation_mark("continuation-mark-set-first", 1, key_arg, val);
|
||||||
|
|
||||||
pos = startpos - findpos;
|
pos = startpos - findpos;
|
||||||
if (pos > 16) {
|
if (pos > 16) {
|
||||||
pos >>= 1;
|
pos >>= 1;
|
||||||
|
@ -7931,8 +7934,6 @@ scheme_extract_one_cc_mark_with_meta(Scheme_Object *mark_set, Scheme_Object *key
|
||||||
} else
|
} else
|
||||||
cht = NULL;
|
cht = NULL;
|
||||||
|
|
||||||
if (key_arg != key)
|
|
||||||
val = scheme_chaperone_do_continuation_mark("continuation-mark-set-first", 1, key_arg, val);
|
|
||||||
if (!cache || !SCHEME_VECTORP(cache)) {
|
if (!cache || !SCHEME_VECTORP(cache)) {
|
||||||
/* No cache so far, so map one key */
|
/* No cache so far, so map one key */
|
||||||
cache = scheme_make_vector(4, NULL);
|
cache = scheme_make_vector(4, NULL);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user