X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Fgeneric%2Fobjdef.lisp;h=bf9217d7750cb3cd68a82c3ac936c85a6a7b8648;hb=5edd74f6911093805a009a152b32216b3dba59f7;hp=786c9d4c5f5df13a118cd32e0b712ba67b15a6c7;hpb=90ca09b75fbc3b63b2f7d09c67b04b866dd783f6;p=sbcl.git diff --git a/src/compiler/generic/objdef.lisp b/src/compiler/generic/objdef.lisp index 786c9d4..bf9217d 100644 --- a/src/compiler/generic/objdef.lisp +++ b/src/compiler/generic/objdef.lisp @@ -193,7 +193,8 @@ :ref-trans %simple-fun-name :set-known (unsafe) :set-trans (setf %simple-fun-name)) - (arglist :ref-known (flushable) + (arglist :type list + :ref-known (flushable) :ref-trans %simple-fun-arglist :set-known (unsafe) :set-trans (setf %simple-fun-arglist)) @@ -315,9 +316,20 @@ (define-primitive-object (symbol :lowtag other-pointer-lowtag :widetag symbol-header-widetag #!-x86 :alloc-trans #!-x86 make-symbol) + + ;; Beware when changing this definition. NIL-the-symbol is defined + ;; using this layout, and NIL-the-end-of-list-marker is the cons + ;; ( NIL . NIL ), living in the first two slots of NIL-the-symbol + ;; (conses have no header). Careful selection of lowtags ensures + ;; that the same pointer can be used for both purposes: + ;; OTHER-POINTER-LOWTAG is 7, LIST-POINTER-LOWTAG is 3, so if you + ;; subtract 3 from (sb-kernel:get-lisp-obj-address 'NIL) you get the + ;; first data slot, and if you subtract 7 you get a symbol header. + (value :set-trans %set-symbol-value - :init :unbound) - #!+x86 (hash) + :init :unbound) ;also the CAR of NIL-as-end-of-list + (hash) ;the CDR of NIL-as-end-of-list + (plist :ref-trans symbol-plist :set-trans %set-symbol-plist :init :null)