* compiler bug in 1.9.9
[not found] <94.9E.26951.FBE797B4@mx15>
@ 2010-03-30 15:02 ` Daniel Llorens del Río
2010-03-30 19:24 ` Andy Wingo
0 siblings, 1 reply; 4+ messages in thread
From: Daniel Llorens del Río @ 2010-03-30 15:02 UTC (permalink / raw)
To: bug-guile
This is with the latest from git.
(use-modules (srfi srfi-26))
(define (f! A B) (array-fill! B 0.))
(define x (make-typed-array 'f64 0. 2))
(cut f! #2f64((0 1) (2 3)) <>)
Throw to key `wrong-type-arg':
ERROR: Wrong type (expecting array): #<<variable-cache-cell> key: f!>
Entering the debugger. Type `bt' for a backtrace or `c' to continue.
0 debug> bt
In ../../src/module/ice-9/boot-9.scm:
1042: 12 (#<procedure e04f90 ()>)
In ../../src/module/system/repl/common.scm:
145: 11 (repl-eval #<<repl> language: #<<language> name: sche...> #)
In ../../src/module/system/base/compile.scm:
237: 10 (compile (cut f! #2f64((0.0 1.0) (2.0 3.0)) <>) #:from # ...)
183: 9 (lp (#<procedure compile-asm (x e opts)> #<proce...> #)
# ...)
In ../../src/module/language/glil/spec.scm:
31: 8 (compile-asm #<glil (program () (source
((breakpoint ...> ...)
In ../../src/module/language/glil/compile-assembly.scm:
155: 7 (compile-assembly #<glil (program () (source ((breakpoin...>)
194: 6 (glil->assembly #<glil (program () (source
((breakpoi...> ...)
186: 5 (lp (#<glil (program () (source ((breakpoint . #...> #)
# ...)
194: 4 (glil->assembly #<glil (program () (source
((breakpoi...> ...)
186: 3 (lp (#<glil (const #2f64((0.0 1.0) (2.0 3.0)))> # # #) # ...)
377: 2 (glil->assembly #<glil (const #2f64((0.0 1.0) (2.0
3....> ...)
120: 1 (assoc-ref-or-acons ((#<<variable-cache-cell> k...> .
1)) ...)
0 (assoc-ref ((#<<variable-cache-cell> key: f!> . 1)) #)
But these three
((cut f! #2f64((0 1) (2 3)) <>) x)
(cut f! #f64(0 1 2) <>)
((cut f! #f64(0 1 2) <>) x)
all work. No error with ,option interp #t.
Regards,
Daniel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: compiler bug in 1.9.9
2010-03-30 15:02 ` compiler bug in 1.9.9 Daniel Llorens del Río
@ 2010-03-30 19:24 ` Andy Wingo
2010-03-31 15:55 ` Daniel Llorens del Río
0 siblings, 1 reply; 4+ messages in thread
From: Andy Wingo @ 2010-03-30 19:24 UTC (permalink / raw)
To: Daniel Llorens del Río; +Cc: bug-guile
On Tue 30 Mar 2010 17:02, Daniel Llorens del Río <daniel.llorens@bluewin.ch> writes:
> 0 (assoc-ref ((#<<variable-cache-cell> key: f!> . 1)) #2f64((0 1) (2 3)))
This was actually a problem with the runtime, not the compiler: equal?
on an array and a non-array bombed. Fixed, thanks!
Andy
--
http://wingolog.org/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: compiler bug in 1.9.9
2010-03-30 19:24 ` Andy Wingo
@ 2010-03-31 15:55 ` Daniel Llorens del Río
2010-03-31 16:12 ` Daniel Llorens del Río
0 siblings, 1 reply; 4+ messages in thread
From: Daniel Llorens del Río @ 2010-03-31 15:55 UTC (permalink / raw)
To: Andy Wingo; +Cc: bug-guile
On 30 Mar, 2010, at 21:24, Andy Wingo wrote:
> On Tue 30 Mar 2010 17:02, Daniel Llorens del Río
> <daniel.llorens@bluewin.ch> writes:
>
>> 0 (assoc-ref ((#<<variable-cache-cell> key: f!> . 1)) #2f64
>> ((0 1) (2 3)))
>
> This was actually a problem with the runtime, not the compiler: equal?
> on an array and a non-array bombed. Fixed, thanks!
Thanks for this, and also for the autocompile fixes. I've got another
one, again with the latest git.
The first two lines work but the third one… doesn't:
> (call-with-values (lambda () (values #s32() #f64(0))) list)
=> (#s32() #f64(0.0))
> (call-with-values (lambda () (values #s32(0) #f64())) list)
=> (#s32(0) #f64())
> (call-with-values (lambda () (values #s32() #f64())) list)
=> (#s32() #s32())
Although this one also works…
> (call-with-values (lambda () (f #s32() #f64())) (lambda (a b)
(format #f "~a ~a" a b)))
=> "#s32() #f64()"
Regards,
Daniel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: bug in 1.9.9
2010-03-31 15:55 ` Daniel Llorens del Río
@ 2010-03-31 16:12 ` Daniel Llorens del Río
0 siblings, 0 replies; 4+ messages in thread
From: Daniel Llorens del Río @ 2010-03-31 16:12 UTC (permalink / raw)
To: Andy Wingo; +Cc: bug-guile
On 31 Mar, 2010, at 17:55, Daniel Llorens del Río wrote:
> Although this one also works…
>
> > (call-with-values (lambda () (f #s32() #f64())) (lambda (a b)
> (format #f "~a ~a" a b)))
> => "#s32() #f64()"
Sorry, this should be … (lambda () (values #s32() #f64())) …
Regards,
Daniel
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-03-31 16:12 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <94.9E.26951.FBE797B4@mx15>
2010-03-30 15:02 ` compiler bug in 1.9.9 Daniel Llorens del Río
2010-03-30 19:24 ` Andy Wingo
2010-03-31 15:55 ` Daniel Llorens del Río
2010-03-31 16:12 ` Daniel Llorens del Río
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).