Changeset 9775


Ignore:
Timestamp:
Jun 17, 2008, 2:18:03 PM (11 years ago)
Author:
wws
Message:

Remove make-instance optimizations when a class is redefined.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/working-0711/ccl/level-1/l1-clos.lisp

    r9669 r9775  
    777777    (setf (find-class name) class)))
    778778           
     779;; Can't go with optimize-make-instance-for-class-name because
     780;; ensure-class-using-class is called before that is defined.
     781(defun pessimize-make-instance-for-class-name (class-name)
     782  (let ((cell (find-class-cell class-name nil)))
     783    (when cell
     784      (setf (class-cell-instantiate cell) '%make-instance))))
     785
    779786;;; Redefine an existing (not forward-referenced) class.
    780787(defmethod ensure-class-using-class ((class class) name &rest keys &key)
     
    783790    (unless (eq (class-of class) metaclass)
    784791      (error "Can't change metaclass of ~s to ~s." class metaclass))
     792    (pessimize-make-instance-for-class-name name)
    785793    (apply #'reinitialize-instance class initargs)
    786794    (setf (find-class name) class)))
Note: See TracChangeset for help on using the changeset viewer.