chicken-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Chicken-hackers] [PATCH] Fix #1620 by ignoring captured state of replac


From: Peter Bex
Subject: [Chicken-hackers] [PATCH] Fix #1620 by ignoring captured state of replaced variables
Date: Sun, 30 Jun 2019 15:56:46 +0200
User-agent: NeoMutt/20170113 (1.7.2)

Hi all,

I had a look at #1620 and as far as I can tell there's no reason why
an aliased variable cannot be marked as replaceable when either the
alias or the variable it aliases are captured.

Captured simply means that it needs to be wrapped up in the closure,
AFAIK.  But if it's replaced, then the original variable will need
to end up in the closure.  The only case where you can't replace is
if either variable is assigned to, because then they don't point to
the same thing anymore.

I've tested several eggs with this and it seems to work fine.  The
test case in #1620 is now compiled similar to the version with manually
inserted eq? calls.

I checked the benchmarks.  It doesn't have much of an effect on most
benchmarks, but gold and gold2 are consistently about 15% faster with
the new version; I did a quick check and it seems there are indeed
several places which look like let calls which get replaced properly.

Cheers,
Peter

Attachment: 0001-Mark-aliased-variable-as-replacable-even-if-either-v.patch
Description: Text Data

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]