Commit 7f7de694 authored by Attila Lendvai's avatar Attila Lendvai

fix failing test 'bug/previously-initially

Ignore-this: 4d63abf412919ed8b4dac0b285ddd678

reported and fixed by Ilya Perminov <iperminov@dwavesys.com>.

darcs-hash:dc32a60ff626a15db2fcb187f43a7dc7225c3f35
parent 510e2577
......@@ -3374,7 +3374,7 @@ e.g. (DSETQ (VALUES (a . b) nil c) form)"
(if (not (and (integerp n) (> n 0)))
(clause-error "~a should be a positive integer" n-expr)
;; Here, n is a positive integer.
(let* ((p-i (intern-previous-info var))
(let* ((p-i (intern-previous-info var :next))
(init-val (make-initial-value default default? (var-type var)))
(temp (if (not (duplicable? init-val))
(make-var-and-default-binding
......@@ -3398,14 +3398,14 @@ e.g. (DSETQ (VALUES (a . b) nil c) form)"
(setf (previous-info-class p-i) class)
(push (cons code (last code)) (previous-info-code p-i)))))
(defun intern-previous-info (var)
(defun intern-previous-info (var &optional (default-class :step))
;; If VAR already has a previous-info structure, return it; else
;; create a new one, put it where it belongs, and return it.
;; Make sure that if VAR is itself a save-var, the new record goes after
;; the one for VAR's var, so that the previous code is generated before it
;; is itself considered update code for another previous splicing.
(or (cdr (assoc var *previous-vars-alist*))
(let* ((p-i (make-previous-info :var var))
(let* ((p-i (make-previous-info :var var :class default-class))
(place (member var *previous-vars-alist*
:test #'is-save-var)))
(if (null place)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment