Changed the loop protocol for :acc clauses
The third clause (the "check" clause) now breaks the entire iteration for :acc clauses instead of just exiting the current subloop. This is much saner, and was immediately usable in vectoring.
This commit is contained in:
parent
90c2c6bfdf
commit
172d0aa180
2 changed files with 32 additions and 38 deletions
|
@ -447,18 +447,12 @@
|
|||
. rest))
|
||||
((_ :acc ((var index) (expr (:length len))) n . rest)
|
||||
(vectoring :acc ((var index) (expr (:length len) (:fill (if #f #f)))) n . rest))
|
||||
|
||||
;; I am truly sorry. Currently this relies on pushing a :break clause WITHOUT
|
||||
;; the :when #t to ensure a subloop. It is the solution I would have used
|
||||
;; otherwise as well, but I would have wished for it to be more elegant.
|
||||
((_ :acc ((var index) (expr (:length len) (:fill f))) next
|
||||
o n l a v c r fi ff ul uw ((ub ...) . ub-rest) uf . rest)
|
||||
((_ :acc ((var index) (expr (:length len) (:fill f))) next . rest)
|
||||
(next ((var (make-vector len f)))
|
||||
((index 0 (begin (vector-set! var index expr) (+ index 1))))
|
||||
()
|
||||
((= index len))
|
||||
()
|
||||
((var var))
|
||||
o n l a v c r fi ff ul uw ((ub ... (= index len)) . ub-rest) uf
|
||||
. rest))))
|
||||
|
||||
;;; Here starts generator clauses.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue