From: Per Bothner <per@bothner.com>
To: kawa@sourceware.org
Subject: Re: [PATCH] further optimization for call-with-values
Date: Fri, 27 Mar 2015 04:41:00 -0000 [thread overview]
Message-ID: <5514DF4D.70409@bothner.com> (raw)
In-Reply-To: <83329DDE-2C17-4907-A588-B4587264A889@theptrgroup.com>
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/
next prev parent reply other threads:[~2015-03-27 4:41 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-25 23:13 Jamison Hope
2015-03-27 4:41 ` Per Bothner [this message]
2015-03-27 14:09 ` Jamison Hope
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5514DF4D.70409@bothner.com \
--to=per@bothner.com \
--cc=kawa@sourceware.org \
/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).