From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andy Wingo Newsgroups: gmane.lisp.guile.devel Subject: Re: CPS and RTL Date: Thu, 24 Jan 2013 16:12:43 +0100 Message-ID: <87sj5qfwd0.fsf@pobox.com> References: <87libjhtk4.fsf@pobox.com> <878v7jnd5m.fsf@tines.lan> <878v7ij2bk.fsf@pobox.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1359040380 6016 80.91.229.3 (24 Jan 2013 15:13:00 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 24 Jan 2013 15:13:00 +0000 (UTC) Cc: Mark H Weaver , guile-devel To: Noah Lavine Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Thu Jan 24 16:13:19 2013 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TyOUQ-00065K-80 for guile-devel@m.gmane.org; Thu, 24 Jan 2013 16:13:18 +0100 Original-Received: from localhost ([::1]:33016 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TyOU8-0007nk-Qo for guile-devel@m.gmane.org; Thu, 24 Jan 2013 10:13:00 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:40274) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TyOU2-0007mt-0C for guile-devel@gnu.org; Thu, 24 Jan 2013 10:12:59 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TyOTv-0004or-Sc for guile-devel@gnu.org; Thu, 24 Jan 2013 10:12:53 -0500 Original-Received: from a-pb-sasl-quonix.pobox.com ([208.72.237.25]:52946 helo=sasl.smtp.pobox.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TyOTv-0004ok-Nw for guile-devel@gnu.org; Thu, 24 Jan 2013 10:12:47 -0500 Original-Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-quonix.pobox.com (Postfix) with ESMTP id 17B6DB56C; Thu, 24 Jan 2013 10:12:47 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=sasl; bh=hAm0FV7UiD9hrjCEm6zSJK+WPm4=; b=Zpp1UZ YbG6VoTeUlP7m6Ov97ziqQgIyekgfmTnnc7wck0/QeY9dRLGwCP9zkSEvse8kdc+ P8ZgLaRqb/IGlE9BexdVm65P5+aIkVDqGdjw/CP/zfSoEZHoul8dDhT5Y90nMePx alrnOJdyNo9CASFBzFxtLJHjaf0cDw0tnFrrE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; q=dns; s=sasl; b=AdW/muIZTYRswmAC6thP1R98tkhxvOlz khe2xP3ju7+tLj9GvImcOU/W9H8KdS8wfiUZ5j/8D1LCuDwr86zU4mH+9K1Y0h2I mDSQqg6cdF2dEl+dzfXMfiGJyGdVoC6RwdWq/WqDVw3IZ6plCx4rtwsd77Co10fu ++F9DVxiA4Y= Original-Received: from a-pb-sasl-quonix.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-quonix.pobox.com (Postfix) with ESMTP id 0DE59B56B; Thu, 24 Jan 2013 10:12:47 -0500 (EST) Original-Received: from badger (unknown [88.160.190.192]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by a-pb-sasl-quonix.pobox.com (Postfix) with ESMTPSA id 275F8B56A; Thu, 24 Jan 2013 10:12:46 -0500 (EST) In-Reply-To: (Noah Lavine's message of "Thu, 24 Jan 2013 08:50:17 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux) X-Pobox-Relay-ID: 8230548A-6638-11E2-BED2-0A4F0E5B5709-02397024!a-pb-sasl-quonix.pobox.com X-detected-operating-system: by eggs.gnu.org: Solaris 10 X-Received-From: 208.72.237.25 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:15581 Archived-At: Hi! On Thu 24 Jan 2013 14:50, Noah Lavine 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/