From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 106281 invoked by alias); 27 Mar 2015 04:41:12 -0000 Mailing-List: contact kawa-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: kawa-owner@sourceware.org Received: (qmail 106270 invoked by uid 89); 27 Mar 2015 04:41:12 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL,BAYES_00,SPF_PASS autolearn=ham version=3.3.2 X-HELO: aibo.runbox.com Received: from aibo.runbox.com (HELO aibo.runbox.com) (91.220.196.211) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Fri, 27 Mar 2015 04:41:10 +0000 Received: from [10.9.9.206] (helo=mailfront02.runbox.com) by bars.runbox.com with esmtp (Exim 4.71) (envelope-from ) id 1YbM4w-0003ID-0P for kawa@sourceware.org; Fri, 27 Mar 2015 05:41:06 +0100 Received: from 76-9-71-51-rt-broadband-00.broadband.oakhurst.sti.net ([76.9.71.51] helo=toshie.bothner.com) by mailfront02.runbox.com with esmtpsa (uid:757155 ) (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.76) id 1YbM4g-0006ta-2k for kawa@sourceware.org; Fri, 27 Mar 2015 05:40:50 +0100 Message-ID: <5514DF4D.70409@bothner.com> Date: Fri, 27 Mar 2015 04:41:00 -0000 From: Per Bothner User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: kawa@sourceware.org Subject: Re: [PATCH] further optimization for call-with-values References: <83329DDE-2C17-4907-A588-B4587264A889@theptrgroup.com> In-Reply-To: <83329DDE-2C17-4907-A588-B4587264A889@theptrgroup.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2015-q1/txt/msg00065.txt.bz2 On 03/25/2015 04:12 PM, Jamison Hope wrote: > The attached patch optimizes the call-with-values case where the > consumer is a single-argument procedure to rewrite > (call-with-values producer consumer) as (consumer (producer)). Thanks - I checked this in. > It works when the consumer is a LambdaExp and also when it is > a ReferenceExp whose value is (known to be) a Procedure. You "missed" one case: Where the consumer is a ReferenceExp that is bound to a LambdaExp - i.e. when the consumer is a named procedure that hasn't been compiled yet. I tweaked your patch to handle this. I also added a test testsuite/values2.scm, and added it to the check-inlining test to make sure it is optimized and stays optimized. -- --Per Bothner per@bothner.com http://per.bothner.com/