Ignore:
Timestamp:
Sep 15, 2010, 12:07:42 AM (9 years ago)
Author:
gz
Message:

r14258 from trunk (defstruct changes)

Location:
branches/qres/ccl
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/qres/ccl

  • branches/qres/ccl/lib/nfcomp.lisp

    r14164 r14259  
    938938
    939939(defun define-compile-time-structure (sd refnames predicate env)
    940   (let ((defenv (definition-environment env)))
     940  (let ((defenv (definition-environment env))
     941        (class-name (and (not (sd-type sd)) (symbolp (sd-name sd)) (sd-name sd))))
    941942    (when defenv
    942       (when (and (non-nil-symbolp (sd-name sd))
    943                  (not (sd-type sd)))
    944         (note-type-info (sd-name sd) 'class env)
    945         (push (make-instance 'compile-time-class :name (sd-name sd))
     943      (when class-name
     944        (note-type-info class-name 'class env)
     945        (push (make-instance 'compile-time-class :name class-name)
    946946              (defenv.classes defenv)))
    947947      (setf (defenv.structures defenv) (alist-adjoin (sd-name sd) sd (defenv.structures defenv)))
    948948      (let* ((structrefs (defenv.structrefs defenv)))
    949         (when (and (null (sd-type sd))
    950                    predicate)
    951           (setq structrefs (alist-adjoin predicate (sd-name sd) structrefs)))
     949        (when (and predicate class-name)
     950          (setq structrefs (alist-adjoin predicate class-name structrefs)))
    952951        (dolist (slot (sd-slots sd))
    953952          (unless (fixnump (ssd-name slot))
    954953            (setq structrefs
    955954                (alist-adjoin (if refnames (pop refnames) (ssd-name slot))
    956                               (ssd-type-and-refinfo slot)
     955                              (cons (ssd-type-and-refinfo slot) class-name)
    957956                              structrefs))))
    958957        (setf (defenv.structrefs defenv) structrefs)))))
Note: See TracChangeset for help on using the changeset viewer.