we're violating continuation marks for some reason.
This commit is contained in:
parent
fa0864a465
commit
59dd18976f
|
@ -31,7 +31,8 @@
|
|||
return '#<continuation-mark-set>';
|
||||
};
|
||||
|
||||
ContinuationMarkSet.prototype.ref = function(key) {
|
||||
ContinuationMarkSet.prototype.ref = function(key, promptTag) {
|
||||
// FIXME: ref needs to watch the promptTag as well and capture up to it.
|
||||
var i, j;
|
||||
var result = [];
|
||||
var kvlist;
|
||||
|
|
|
@ -2206,6 +2206,21 @@
|
|||
return contMarks;
|
||||
});
|
||||
|
||||
installPrimitiveProcedure(
|
||||
'continuation-mark-set->list',
|
||||
makeList(2, 3),
|
||||
function(M) {
|
||||
var marks = checkContinuationMarkSet(M, 'continuation-mark-set->list', 0);
|
||||
var key = checkAny(M, 'continuation-mark-set->list', 1);
|
||||
var promptTag;
|
||||
if (M.a === 3) {
|
||||
promptTag = checkContinuationPromptTag(M, 'current-continuation-marks', 2);
|
||||
}
|
||||
return marks.ref(key, promptTag);
|
||||
});
|
||||
|
||||
|
||||
|
||||
installPrimitiveClosure(
|
||||
'make-struct-type',
|
||||
makeList(4, 5, 6, 7, 8, 9, 10, 11),
|
||||
|
|
|
@ -257,7 +257,8 @@
|
|||
|
||||
|
||||
current-continuation-marks
|
||||
|
||||
continuation-mark-set->list
|
||||
|
||||
;; continuation-mark-set?
|
||||
;; continuation-mark-set->list
|
||||
|
||||
|
|
11
tests/more-tests/cont-marks-1.rkt
Normal file
11
tests/more-tests/cont-marks-1.rkt
Normal file
|
@ -0,0 +1,11 @@
|
|||
#lang planet dyoo/whalesong
|
||||
|
||||
(define (puzzle n)
|
||||
(if (= n 0)
|
||||
(continuation-mark-set->list (current-continuation-marks) 'secret)
|
||||
(with-continuation-mark 'secret
|
||||
(* n (first (continuation-mark-set->list (current-continuation-marks) 'secret)))
|
||||
(puzzle (sub1 n)))))
|
||||
|
||||
(with-continuation-mark 'secret 1
|
||||
(puzzle 10))
|
Loading…
Reference in New Issue
Block a user