From: "Tommi Höynälänmaa" <tommi.hoynalanmaa@gmail.com>
To: 31594@debbugs.gnu.org
Subject: bug#31594: Code causes guild compile to hang
Date: Fri, 25 May 2018 18:32:24 +0300 [thread overview]
Message-ID: <CAAkPRizz=UwoGpdK3qaAnGnk1G0O41tN-bmgwwyftuGZ=0jCQA@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 2036 bytes --]
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
[-- Attachment #2: Type: text/html, Size: 2646 bytes --]
next reply other threads:[~2018-05-25 15:32 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-25 15:32 Tommi Höynälänmaa [this message]
2018-05-27 13:04 ` bug#31594: Information on my system Tommi Höynälänmaa
2018-06-05 22:01 ` bug#31594: Code causes guild compile to hang Mark H Weaver
2018-06-06 2:23 ` Mark H Weaver
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAAkPRizz=UwoGpdK3qaAnGnk1G0O41tN-bmgwwyftuGZ=0jCQA@mail.gmail.com' \
--to=tommi.hoynalanmaa@gmail.com \
--cc=31594@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).