chicken-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-hackers] Folding lolevel bindings


From: Peter Bex
Subject: Re: [Chicken-hackers] Folding lolevel bindings
Date: Mon, 22 Feb 2016 10:19:06 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

On Mon, Feb 22, 2016 at 10:08:32PM +1300, Evan Hanson wrote:
> Hi all,
> 
> I've found a small issue with constant folding for procedures from the
> lolevel unit, uncovered by the recent error handling changes in that
> code (812b52e in master). Basically, the compiler doesn't use lolevel,
> so the foldable bindings from that unit are never bound to procedures,
> so they trigger the compilation error at support.scm:1508. You can see
> this by compiling the program "(number-of-slots #(1 2 3))" with master.
> 
> I can think of two ways to fix this. One is to once again bail from just
> `constant-form-eval` (rather than bombing out of compilation entirely)
> when an identifier is found not to be bound to a procedure. The other is
> to simply make the compiler use unit lolevel. I went through the various
> lists of identifiers and lolevel seems to be the only unit with foldable
> bindings that isn't loaded by the compiler.
> 
> Thoughts?

What does this mean for eggs or other user code with #:foldable
annotations?  I'd imagine that this will just break there too?

Maybe we need to somehow load the module and its unit when we encounter
#:foldable for some library.  OTOH, in master we don't explicitly
indicate the module name that an identifier is from.

Cheers,
Peter

Attachment: signature.asc
Description: Digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]