On Fri 22 May 2009 17:10, l...@gnu.org (Ludovic Courtès) writes: > ¡Hola! > > Andy Wingo <wi...@pobox.com> writes: > >> I'm catching up with mail. On my syncase-in-boot-9 branch, I enabled >> compilation of srfi-18 and fixed a bug in it regarding multiple-value >> returns. Now I just ran the srfi-18 test like 100 times in a row and it >> didn't show any strange errors. Yaaaay! > > What kind of "strange errors" would it lead to before?
Random ones based on races, as code was lazily memoized from multiple threads at once. > When SRFI-18 wasn't compiled, I would expect multiple value returns > would translate in a `value.c' struct that would then be passed along as > a single value. Indeed. The VM truncates multiple values, but here we were doing a (let ((x (values))) something x), which returned 0 values to a continuation needing a value, raising a valid error. Fixed that in the original source code. In addition, we were sometimes getting 0 values in a for-effect context, which the GHIL->GLIL compiler didn't support. Like this: (begin (call/cc (lambda (k) (k))) 10) I've fixed this in the tree-il->glil compiler. Cheers, Andy -- http://wingolog.org/