GNU bug report logs -
#31594
Code causes guild compile to hang
Previous Next
Full log
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
The following code causes command "guild compile" to hang:
---cut here---
(define (select-nearest-methods binder
index v-fixed-args v-rest-arg vb-included)
(dwl4 "select-nearest-methods")
(assert (is-binder? binder))
(let ((n (vector-length vb-included)))
(do ((i 0 (+ i 1))) ((>= i n))
(if (vector-ref vb-included i)
(let ((t1 (get-item-at-index
(vector-ref v-fixed-args i)
(vector-ref v-rest-arg i)
index)))
(do ((j 0 (+ j 1))) ((>= j n))
(if (and (not (= i j))
(vector-ref vb-included j))
(let ((t2 (get-item-at-index
(vector-ref v-fixed-args j)
(vector-ref v-rest-arg j)
index)))
(if (is-t-subtype? binder t1 t2)
;; t2 is excluded
(vector-set! vb-included j #f))))))))))
---cut here---
However, the following code works fine:
---cut here---
(define (method-loop binder
index v-fixed-args v-rest-arg vb-included t1 i n)
(do ((j 0 (+ j 1))) ((>= j n))
(if (and (not (= i j))
(vector-ref vb-included j))
(let ((t2 (get-item-at-index
(vector-ref v-fixed-args j)
(vector-ref v-rest-arg j)
index)))
(if (is-t-subtype? binder t1 t2)
;; t2 is excluded
(vector-set! vb-included j #f))))))
(define (select-nearest-methods binder
index v-fixed-args v-rest-arg vb-included)
(dwl4 "select-nearest-methods")
(assert (is-binder? binder))
(let ((n (vector-length vb-included)))
(do ((i 0 (+ i 1))) ((>= i n))
(if (vector-ref vb-included i)
(let ((t1 (get-item-at-index
(vector-ref v-fixed-args i)
(vector-ref v-rest-arg i)
index)))
(method-loop binder index v-fixed-args v-rest-arg vb-included
t1 i n))))))
---cut here---
This problem occurs with guile 2.2.3.
- Tommi Höynälänmaa
[Message part 2 (text/html, inline)]
This bug report was last modified 7 years and 10 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.