Changeset 14345


Ignore:
Timestamp:
Oct 8, 2010, 7:44:55 PM (9 years ago)
Author:
rme
Message:

In define-compile-time-structure, don't add refinfo for inherited
slots. This addresses ticket:750.

Location:
trunk/source/lib
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/lib/defstruct-macros.lisp

    r13067 r14345  
    5151(defmacro refinfo-r/o (refinfo) `(%ilogbitp $struct-r/o ,refinfo))
    5252(defmacro refinfo-reftype (refinfo) `(%ilogand2 #xFF (%ilsr 16 ,refinfo)))
     53(defmacro refinfo-inherited (refinfo) `(%ilogbitp $struct-inherited ,refinfo))
    5354
    5455(defmacro ssd-offset (ssd) `(refinfo-offset (ssd-refinfo ,ssd)))
    5556(defmacro ssd-r/o (ssd) `(refinfo-r/o (ssd-refinfo ,ssd)))
    5657(defmacro ssd-reftype (ssd) `(refinfo-reftype (ssd-refinfo ,ssd)))
     58(defmacro ssd-inherited (ssd) `(refinfo-inherited (ssd-refinfo ,ssd)))
    5759
    5860(defmacro ssd-set-initform (ssd value) `(rplaca (cdr ,ssd) ,value))
  • trunk/source/lib/nfcomp.lisp

    r14312 r14345  
    959959          (setq structrefs (alist-adjoin predicate class-name structrefs)))
    960960        (dolist (slot (sd-slots sd))
    961           (unless (fixnump (ssd-name slot))
    962             (setq structrefs
    963                 (alist-adjoin (if refnames (pop refnames) (ssd-name slot))
    964                               (cons (ssd-type-and-refinfo slot) class-name)
    965                               structrefs))))
     961          (cond
     962            ((fixnump (ssd-name slot))) ;skip
     963            ((ssd-inherited slot)
     964             (when refnames (pop refnames)))
     965            (t
     966             (setq structrefs
     967                   ;; structrefs isn't a proper alist
     968                   (alist-adjoin (if refnames (pop refnames) (ssd-name slot))
     969                                 (cons (ssd-type-and-refinfo slot) class-name)
     970                                 structrefs)))))
    966971        (setf (defenv.structrefs defenv) structrefs)))))
    967972
Note: See TracChangeset for help on using the changeset viewer.