kawa-commonlisp-dev
[Top][All Lists]
Advanced

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

Re: [Kawa-commonlisp-dev] CL primitives


From: Per Bothner
Subject: Re: [Kawa-commonlisp-dev] CL primitives
Date: Sat, 08 Feb 2014 21:36:07 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0

On 02/08/2014 04:16 PM, Charles Turner wrote:
Please find more CL primitives attached.

Thanks - I've checked those in.

I tweaked the new tests to use defvar or let instead of
setq, to avoid warnings.

I'm not happy with my implementation of MEMBER, it looks nasty and is
probably inefficient. IIUC, Kawa doesn't implement tail-calls by
default due the Java calling conventions. When I have LOOP or
something similar I can improve that easily.

These are simple tail-calls, which Kawa optimizes to loops.
(I took a look at the bytecode to make sure.)

Speaking of nasty, APPLY is even worse. I had to add another overload
in gnu/expr/Apply.java to allow getArguments to be called from Lisp
code. Maybe there is a better way to achieve this.

Good enough for now.
--
        --Per Bothner
address@hidden   http://per.bothner.com/



reply via email to

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