On Wed, Dec 5, 2012 at 5:14 PM, Ludovic Courtès <[email protected]> wrote:

> Noah Lavine <[email protected]> skribis:
>
> > That makes sense. I hit this error in debugging a CPS->GLIL compiler
> (which
> > I hope will become Guile's compiler, but that's another story). However,
> > once the debugging is done, I suppose it won't make a difference.
>
> Oooh, make sure to post about your plans.


I will post more when I have more code to show, but basically it's the same
idea as the CPS-to-RTL experiment earlier. The difference is that in that
post I said that adding two new things at the same time (CPS and RTL) was
probably a bad idea. Now I'm doing something about it, by making the CPS
compiler generate GLIL instead. I hope this will be an easier path towards
a nicer compiler.


> > What do you think about enabling it only in the debug VM, or something
> like
> > that? Then if there's some way for me to run my code in debug mode, I can
> > get the better output without slowing down most things.
>
> I’m inclined to leave it as is, because it’s only hit when generating
> wrong code.  How strongly do you feel about it?  :-)
>

Well, I just fixed the bug, so I feel fine right now. :-)

In general, I do think there should at least be an option for having full
error-checking in the VM. It would have been much, much harder for me to
find this without having patched the VM, because it would have taken me a
very long time to try each new thing I tried, because I would have had to
restart Guile. I am happy for it not to be on the regular code-path,
though. I also realize that writing a compiler is an unusual application,
so maybe it should even be a compile-time option for users who prefer their
Guile slow. How does that sound?

Noah

Reply via email to