X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Fgeneric%2Fobjdef.lisp;h=786c9d4c5f5df13a118cd32e0b712ba67b15a6c7;hb=d40a76606c86722b0aef8179155f9f2840739b72;hp=17b27e37e03ba1df14d904878666c8645b0e7b03;hpb=545fa4548b327804cf78afe38a2ecd94ced86162;p=sbcl.git diff --git a/src/compiler/generic/objdef.lisp b/src/compiler/generic/objdef.lisp index 17b27e3..786c9d4 100644 --- a/src/compiler/generic/objdef.lisp +++ b/src/compiler/generic/objdef.lisp @@ -10,6 +10,31 @@ ;;;; files for more information. (in-package "SB!VM") + +;;;; KLUDGE: The primitive objects here may look like self-contained +;;;; definitions, but in general they're not. In particular, if you +;;;; try to add a slot to them, beware of the following: +;;;; * (mysterious crashes which occur after changing the length +;;;; of SIMPLE-FUN, just adding a new slot not even doing anything +;;;; with it, still dunno why) +;;;; * The GC scavenging code (and for all I know other GC code too) +;;;; is not automatically generated from these layouts, but instead +;;;; was hand-written to correspond to them. The offsets are +;;;; automatically propagated into the GC scavenging code, but the +;;;; existence of slots, and whether they should be scavenged, is +;;;; not automatically propagated. Thus e.g. if you add a +;;;; SIMPLE-FUN-DEBUG-INFO slot holding a tagged object which needs +;;;; to be GCed, you need to tweak scav_code_header() and +;;;; verify_space() in gencgc.c, and the corresponding code in gc.c. +;;;; * The src/runtime/print.c code (used by LDB) is implemented +;;;; using hand-written lists of slot names, which aren't automatically +;;;; generated from the code in this file. +;;;; * Various code (e.g. STATIC-FSET in genesis.lisp) is hard-wired +;;;; to know the name of the last slot of the object the code works +;;;; with, and implicitly to know that the last slot is special (being +;;;; the beginning of an arbitrary-length sequence of bytes following +;;;; the fixed-layout slots). +;;;; -- WHN 2001-12-29 ;;;; the primitive objects themselves @@ -176,6 +201,12 @@ :ref-trans %simple-fun-type :set-known (unsafe) :set-trans (setf %simple-fun-type)) + ;; the SB!C::DEBUG-FUN object corresponding to this object, or NIL for none + #+nil ; FIXME: doesn't work (gotcha, lowly maintenoid!) See notes on bug 137. + (debug-fun :ref-known (flushable) + :ref-trans %simple-fun-debug-fun + :set-known (unsafe) + :set-trans (setf %simple-fun-debug-fun)) (code :rest-p t :c-type "unsigned char")) (define-primitive-object (return-pc :lowtag other-pointer-lowtag :widetag t) @@ -273,7 +304,7 @@ ;;; (For an explanation of this, see the comments at the definition of ;;; KLUDGE-NONDETERMINISTIC-CATCH-BLOCK-SIZE.) -(aver (= sb!vm::kludge-nondeterministic-catch-block-size catch-block-size)) +(aver (= kludge-nondeterministic-catch-block-size catch-block-size)) ;;;; symbols