[Top][All Lists]

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

Re: [Axiom-developer] numberOfEmptySlots

From: Waldek Hebisch
Subject: Re: [Axiom-developer] numberOfEmptySlots
Date: Sat, 15 Sep 2007 19:10:42 +0200 (CEST)

Gabriel Dos Reis wrote:
> On Sat, 15 Sep 2007, Waldek Hebisch wrote:
> | The problem is due to incomplete conversion form old Boot to Shoe.
> | Originally clam.boot was translated by old Boot and NE was passed
> | unmolested to Lisp output.  In vmlisp.lisp we have:
> | 
> | (defmacro ne (a b) `(not (equal ,a ,b)))
> | 
> | so original meaning was (not (equal x cache)).  Shoe changes
> | NE to /= leading to error...
> I still believe the code is incorrect if `not equal' is intented.
> The condition in the loop is testing whether x does not contain
> itself.  If equal is used, then I suspect that will end up with
> an infinite loop.  Rather, I suspect it should have been `not eq'.

I tend to agree: the argument is a circular list so a test is
neccessary and eq is sufficient.  To be more precise: I think
that original code form Ansi point of view has undefined behaviour,
but works in practical implementations.  However using `not eq'
looks cleaner.

BTW: the only way to call numberOfEmptySlots seem to be via clamStats
and clamStats is unused so one have to call it via )lisp command.
However when clamStats is called form command line is seems that
numberOfEmptySlots is still unused, because normally $clamList
contains only hashtables (AFAICS list are used only during

                              Waldek Hebisch

reply via email to

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