Dead code found, some questions and suggestions

Compro Prasad <[email protected]>
Newsgroups gmane.lisp.clisp.devel
Message-ID <CAF5vbP=d4FdJfwzz3oJti2d21W4EymWWf_GFEhjPyJGASeYVOg@mail.gmail.com>
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

2) How to print a symbol's name from gdb? Is it through pname? But how to get
   the actual (char *) out of it?

3) As for now I can't understand the memory layout of gcv_object_t which seems
   to contain type information along with address of some other objects in the
   memory. It would be quite beneficial if you could point out some information
   to get it clear.

4) I was considering to provide each symbol with a mutex so that they could be
   locked when any function tries to change the value of the symbol. And this
   has to be done in the function itself. For example, if
        struct symbol_
        {
            /* other contents */
            xmutex_raw_t mut;
        }
   is the definition of a symbol_ then mut can be used to lock it for writing
   purposes or even deletion too.

------------------------------------------------------------------------------
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.