guile-devel
[Top][All Lists]
Advanced

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

Re: Lua


From: Andy Wingo
Subject: Re: Lua
Date: Thu, 03 Jun 2010 21:29:15 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.92 (gnu/linux)

Heya,

On Thu 03 Jun 2010 10:32, No Itisnt <address@hidden> writes:

> - Right now I've stuffed everything into one file. When it doesn't
> recompile automatically (as in I run it without making changes, after
> a run that autocompiled it) it can't resolve MAKE-APPLICATION from
> (language tree-il) so a bunch of my tests cause errors. Any known bugs
> that would cause that?

Not a known bug, no. Can you make a test case?

http://www.slate.com/id/2081042

> - Will Guile correctly optimize explicit returns as tail calls? I
> couldn't tell from a quick look but my gut feeling is that it only
> optimizes implicit returns, as opposed to those using (primitive-ref
> return)?

No, it will not. The primitive-ref return thing is a hack; the proper
way to do this (I think?) is to use prompts and aborts, and also enhance
Guile's compiler to do source-to-source translation of Tree-IL in which
an intraprocedural abort to a prompt with a fresh tag that cannot escape
the prompt expression does some kind of CPS on the expression to leave
the return expression in tail context.

Otherwise we could add `return' to Tree-IL, but that is nasty I think;
or another hack (nasty, but perhaps expedient). Better to CPS, in the
long run anyway.

Andy
-- 
http://wingolog.org/



reply via email to

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