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 thoughts Date: Tue, 21 May 2013 21:46:06 +0200 Message-ID: <87a9no86bl.fsf@pobox.com> References: <87ppwl9zgi.fsf@pobox.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1369165576 16413 80.91.229.3 (21 May 2013 19:46:16 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 21 May 2013 19:46:16 +0000 (UTC) Cc: guile-devel To: Noah Lavine Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Tue May 21 21:46:17 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 1UesVk-0006By-OT for guile-devel@m.gmane.org; Tue, 21 May 2013 21:46:16 +0200 Original-Received: from localhost ([::1]:47833 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UesVk-0004i7-BL for guile-devel@m.gmane.org; Tue, 21 May 2013 15:46:16 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:55829) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UesVg-0004et-Ku for guile-devel@gnu.org; Tue, 21 May 2013 15:46:13 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UesVf-0003oM-8T for guile-devel@gnu.org; Tue, 21 May 2013 15:46:12 -0400 Original-Received: from a-pb-sasl-quonix.pobox.com ([208.72.237.25]:52758 helo=sasl.smtp.pobox.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UesVf-0003oE-4p for guile-devel@gnu.org; Tue, 21 May 2013 15:46:11 -0400 Original-Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-quonix.pobox.com (Postfix) with ESMTP id A9255C6E8; Tue, 21 May 2013 15:46:10 -0400 (EDT) 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:content-transfer-encoding; s=sasl; bh=pmUpUNx4PSdC hgTzN1VhBxvyvMk=; b=j1eMXglFBY/qP4P4l8JOOxv7JpOY3u2UGP0xGK2gQSrq lawnGuJK5op0J0wpDGSlrf+iKLeHpM5ZslILbiqIBjjOT25hI9B3Ry2IGeFtdBFc pp8VK10n2nsB81ISnDXItkAGfNsCygE8+h+QBGI2OU79IYbTtogkmY+LaoZOjpw= 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:content-transfer-encoding; q=dns; s=sasl; b=U7TGaG QylBwkmm1J0Z2XX98JlxPynaNkIOe6k9PohfCTF3DIEdGGETY5PRgiz80sv77QVf 8qBxCG8JhmyJwFbpcZAVW1TEOVstcVsgix3//i599JtiuQp0fH1xO1Y16U3GcOMz ctHkufk/AMU9zQL+NGmwmSAvNBfOc/Xp/Gdnc= 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 A2040C6E7; Tue, 21 May 2013 15:46:10 -0400 (EDT) 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 E8F86C6E6; Tue, 21 May 2013 15:46:09 -0400 (EDT) In-Reply-To: (Noah Lavine's message of "Mon, 20 May 2013 23:21:10 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux) X-Pobox-Relay-ID: 15F0363C-C24F-11E2-9982-9F710E5B5709-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:16400 Archived-At: On Tue 21 May 2013 05:21, Noah Lavine writes: > =C2=A0* Missing distinction between original names and unique names. >=20=20=20=20=20 > > Yes, I agree. I think it even reuses original names sometimes, which is > not good. I should just rename everything. You should have two names: the original ones and the gensyms that come from tree-il. Creating new gensyms should happen when copying or fabricating new nodes, as peval does, but in most cases you don't need to do it, and in any case it can be tricky. I would take tree-il as the guide here. > =C2=A0* Missing source information. >=20=20=20=20=20 > > The issue here is not that it's hard to pass source information through > to the compiler, but that I haven't figured out what to do with it when > I have it. I imagine that your ELF work has solved this problem. I haven't handled source information yet, but to the CPS->RTL compiler it will look like emitting special instructions, like the tree-il->glil compiler emits nodes. > =C2=A0 * Missing procedure properties. >=20=20=20=20=20 > Can you explain what you mean? Does the compiler need to handle > procedure properties specially? This is lambda-properties. You just pass them through, and add them to the begin-program in the RTL. Note that wip-rtl-may-2013 and the RTL branches that are under review for master are slightly different from the ones you have. Their begin-program has a second argument, the procedure properties, and the first argument is a label and not a name. They have begin-*-arity and end-arity for marking arity information and performing arity prologues. There are some slight changes to instructions but not much. OTOH they do have some better type checking and a disassembler that works, so many things should be easier ;) Compare the rtl.test there and your rtl.test for details. > =C2=A0 * Why is there no "let" that can bind functions? =C2=A0You don= 't always > want > =C2=A0 =C2=A0to set up a recursive binding environment. >=20=20=20=20=20 > =C2=A0* Lambdas are missing lambda* and case-lambda support. >=20=20=20=20=20 > With these two, it's just that I haven't implemented it yet. I'll try to > do it quickly, although I don't know how much time I'll have to work on > it. Understood. However the question of language is fundamental for enabling collaboration on this code. I would be very happy to see a CPS language definition that could express all of Tree-IL. I don't think this would take a lot of work -- it is perfectly acceptable to throw "unimplemented" for those parts of the compiler that aren't there yet, but the language itself should be adequately expressive. IMHO anyway. Do you think you will have time to do that over the next few days or so? Apologies for the pressure, just that I would like to do some things in this area and am not sure how best to do them :) > Sounds great! I think the compiler stuff is fairly separate from the RTL > stuff - when I've rebased it occasionally, it hasn't been a problem. Excellent :) Note the changes I mentioned above. Cheers, Andy --=20 http://wingolog.org/