GSOC | Extending Common Lisp support

Charles Turner chturne@gmail.com
Fri Jun 15 18:08:00 GMT 2012


Thanks for that Jamison.

I'm confused about the seemingly different method of computing hash
indices in Namespace.

Namespace#add is computing the index as

add (Symbol s)
  index = s.hashCode() & mask;

whereas remove is computing the index as

remove (Symbol s)
  name = s.getLocalPart();
  index = name.hashCode() & mask;

Surely with this tactic an empty table will most likely not remain empty after:

add(s);
remove(s);

due to the Symbol most likely having a different hash code to a
resident string. Is this just a thinko, or am I missing something?

Charles.



More information about the Kawa mailing list