> On 27 Feb 2023, at 11:11, Ludovic Courtès wrote:
>
> Hi Daniel,
>
> lloda skribis:
>
>> From 61ed612fb36108e395bdee4b1bbb46b49ef017b3 Mon Sep 17 00:00:00 2001
>> From: Daniel Llorens
>> Date: Thu, 23 Feb 2023 17:38:10 +0100
>> Subject: [PATCH] peval reduces some inlined case-lambda calls
Hi Daniel,
lloda skribis:
> From 61ed612fb36108e395bdee4b1bbb46b49ef017b3 Mon Sep 17 00:00:00 2001
> From: Daniel Llorens
> Date: Thu, 23 Feb 2023 17:38:10 +0100
> Subject: [PATCH] peval reduces some inlined case-lambda calls
>
> * module/language/tree-il/peval.scm (peval): Reduce multiple case
Fixed patch handling rest & #:optional, with test cases.
0001-peval-reduces-some-inlined-case-lambda-calls.patch
Description: Binary data
Patch attached, tests tbd. Thoughts?
0001-peval-reduces-some-inlined-case-lambda-calls.patch
Description: Binary data
On 3.0.9
> ,optimize ((case-lambda (() 0)))
= 0
but
> ,optimize ((case-lambda (() 0) ((a) 1)))
= ((case-lambda (() 0) ((a) 1)))
The problem with this is that when the output of a macro contains case-lambda,
recursive application results in geometrical increase of code size. It seems
that