[Openmcl-devel] Why is remhash being called here?
Gary Byers
gb at clozure.com
Sun Jun 30 14:08:41 PDT 2013
My guess is that REMHASH is being called to remove something from a hash table.
If your next question is going to be something like "what hash table, and why
is a hash table apparently being maintained when forms are being read bv the
REPL (in this case) ?", a short answer is that this is involved in making
M-. (the editor command) work in more cases for more people and in allowing
DISASSEMBLE to annotate its output with the corresponding source code.
If your next question is going to be "aren't there significant costs involved
here, and do the benefits justify those costs ?", my answer would be a resounding ...
oh wait, you haven't really asked that question. Never mind.
On Sun, 30 Jun 2013, Ron Garret wrote:
> Welcome to Clozure Common Lisp Version 1.9-dev-r15769M-trunk (DarwinX8664)!
> ? (defun _$-reader (stream char)
> (unread-char char stream)
> (let ((*readtable* (copy-readtable nil)))
> (read stream)))
> _$-READER
> ? (set-macro-character #\$ '_$-reader t)
> T
> ? (trace remhash)
> NIL
> ? '$x
>
> 0> Calling (REMHASH \$X #<HASH-TABLE :TEST EQ size 2/60 #x302000E27E1D>)
> <0 REMHASH returned T
> \$X
> ? (eval (read-from-string "'$x"))
> \$X
>
> _______________________________________________
> Openmcl-devel mailing list
> Openmcl-devel at clozure.com
> http://clozure.com/mailman/listinfo/openmcl-devel
>
>
More information about the Openmcl-devel
mailing list