Re: Dead code found, some questions and suggestions

Bruno Haible <[email protected]>
Newsgroups gmane.lisp.clisp.devel
Message-ID <1829330.Q9UzIRsFs0@omega>
Compro Prasad wrote:
> 1) symbol_bit_o and symbol_bit_t are not defined anywhere in the source tree
>    but still checking for it and defining other things using it is useless. Will
>    it be defined in future or is a portability option(which I don't
> think so). If
>    none of them are true then it should be removed. I found them using
>    "grep symbol_bit -rn src/". The #+BEGIN_SRC contains the block of code which
>    has to be reduced.
>    #+BEGIN_SRC c -i
>         /* Test for Symbol */
>         #ifdef TYPECODES
>           #if defined(symbol_bit_o)
>             /* define symbolp(obj)  (as_oint(obj) & wbit(symbol_bit_o)) */
>             #define symbolp(obj)  (wbit_test(as_oint(obj),symbol_bit_o))
>             #ifdef WIDE_STRUCT
>               #undef symbolp
>               #define symbolp(obj)  (typecode(obj) & bit(symbol_bit_t))
>             #endif
>           #else
>             #define symbolp(obj)  (typecode(obj) == symbol_type)
>           #endif
>         #else
>           #define symbolp(obj)  \
>             (varobjectp(obj) && (Record_type(obj) == Rectype_Symbol))
>         #endif
>    #+END_SRC

Thanks for the note. In the early days of clisp, many bits were available
in an address for type checking, so we used an extra bit to indicate a symbol.
This is no longer the case on average, and a typecode comparison is just as
fast as a bit test. So I'm comfortable in removing this old special code.
Thanks.

Btw, this is now the 5th mail of yours that my mail provider classified as
"spam". Sorry for not replying on the earlier ones - I just did not see them.

Bruno


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
clisp-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/clisp-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.