[cmucl-help] INFO information: where is it?
Chun Tian (binghe)
binghe.lisp at gmail.com
Fri Jan 8 14:01:50 CET 2010
Hi, Macro
Using (describe 'info) you'll find the key:
(describe 'info)
INFO is an external symbol in the EXTENSIONS package.
Macro-function: #<Function (:MACRO INFO) {10511EA9}>
Macro arguments:
(class type name &optional env-list)
Macro documentation:
Return the information of the specified Type and Class for Name.
The second value is true if there is any such information recorded. If
there is no information, the first value is the default and the second value
is NIL.
On Tuesday, 9/29/09 06:16:19 am [-8] it was compiled from:
target:compiler/globaldb.lisp
It's in compiler/globaldb.lisp, from line 311:
;;; Info -- Public
;;;
;;; This is a macro so that we can resolve the Class and Type to a type
;;; number at compile time. When we check the new-value's type directly in the
;;; SETF expansion, since the check can be done much more efficiently when the
;;; type is constant.
;;;
(defmacro info (class type name &optional env-list)
"Return the information of the specified Type and Class for Name.
The second value is true if there is any such information recorded. If
there is no information, the first value is the default and the second value
is NIL."
;;
;; ### Should be a values type, but interpreter can't hack that now.
(let* ((class (symbol-name class))
(type (symbol-name type))
(info (type-info-or-lose class type)))
`(truly-the (values ,(type-info-type info) t)
(get-info-value ,name ,(type-info-number info)
,@(when env-list `(,env-list))))))
Hope this helps.
--binghe
在 2010-1-8,19:34, Marco Antoniotti 写道:
> Hi
>
> it has been a while since I looked at the sources of CMUCL (or any other CL). I have a question.
>
> Where is the INFO function/macro etc defined?
>
> Thanks
>
>
> --
> Marco Antoniotti
>
>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2603 bytes
Desc: not available
URL: <http://lists.zs64.net/mailman-archive/cmucl-help/attachments/20100108/7e16d341/attachment.bin>
More information about the cmucl-help
mailing list