This is the mail archive of the kawa@sourceware.org mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] further optimization for call-with-values




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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]