From: Andy Wingo <wingo@pobox.com>
To: Noah Lavine <noah.b.lavine@gmail.com>
Cc: Mark H Weaver <mhw@netris.org>, guile-devel <guile-devel@gnu.org>
Subject: Re: CPS and RTL
Date: Thu, 24 Jan 2013 16:12:43 +0100 [thread overview]
Message-ID: <87sj5qfwd0.fsf@pobox.com> (raw)
In-Reply-To: <CA+U71=NqA-SQfMVVT8t5-teeatVZcy5athG-r5gXYhsbEHuaWw@mail.gmail.com> (Noah Lavine's message of "Thu, 24 Jan 2013 08:50:17 -0500")
Hi!
On Thu 24 Jan 2013 14:50, Noah Lavine <noah.b.lavine@gmail.com> writes:
> Thanks for the review! There has actually been more progress since I
> pushed that branch. I hit a point in the CPS->RTL stuff where I had
> trouble because I didn't know how to do things (like mutable variables)
> in RTL. So I've actually ported the compiler to GLIL in a branch on my
> computer. I also have a working Tree-IL->CPS compiler for some of
> Tree-IL (it's not done yet).
>
> I thought that might be a better way forward because CPS and RTL are, to
> a certain extent, separate ideas.
Cool, please push so we can see.
Honestly I think RTL and CPS go together very well. CPS is all about
giving a name to everything, but that can be inefficient in a stack VM,
because referencing and updating named variables requires separate push
and pop instructions. RTL makes this easy and cheap.
Regarding mutable variables: we probably still need to box them in
general because of call/cc. There are cases in which they can be
unboxed, but I think that store-to-load forwarding with DCE can probably
recover many of those cases. Dunno. I would box them as part of an
assignment conversion pass.
> I realize it might be confusing to start with CPS->RTL, then switch to
> CPS->GLIL, then switch back later when the RTL branch is ready. If you'd
> rather do it that way, we can skip the CPS->GLIL phase.
Personally I would prefer to target RTL. But that is a personal opinion
:)
Cheers, and happy hacking :)
Andy
--
http://wingolog.org/
next prev parent reply other threads:[~2013-01-24 15:12 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-17 15:35 CPS and RTL Noah Lavine
2012-11-17 20:18 ` Stefan Israelsson Tampe
2013-01-24 8:30 ` Andy Wingo
2013-01-24 9:28 ` Mark H Weaver
2013-01-24 10:35 ` Andy Wingo
2013-01-24 10:38 ` Nala Ginrut
2013-01-24 13:34 ` Andy Wingo
2013-01-24 13:50 ` Noah Lavine
2013-01-24 15:12 ` Andy Wingo [this message]
2013-01-24 16:03 ` Noah Lavine
2013-01-25 4:38 ` Noah Lavine
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87sj5qfwd0.fsf@pobox.com \
--to=wingo@pobox.com \
--cc=guile-devel@gnu.org \
--cc=mhw@netris.org \
--cc=noah.b.lavine@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).