anchor.diff:  ;      (:instance (error "Allocation :instance not allowed in class ~A" class))
         (t (call-next-method))))
   
  -
     (defmethod effective-slot-definition-class ((class proxy-class) initargs)
       (case (getf initargs :allocation)
         (:alien (find-class 'effective-alien-slot-definition))
         (:virtual (find-class 'effective-virtual-alien-slot-definition))
         (t (call-next-method))))
     
  -  
  -  (defmethod compute-virtual-slot-location
  +  (defmethod compute-virtual-slot-accessors
         ((class proxy-class) (slotd effective-alien-slot-definition)
          direct-slotds)
       (with-slots (offset type) slotd
  -      (setf offset (%direct-slot-definitions-slot-value direct-slotds 'offset))
         (let ((reader (intern-reader-function type))
   	    (writer (intern-writer-function type))
   	    (destroy (intern-destroy-function type)))
  +	(setf offset (slot-definition-offset (first direct-slotds)))
   	(list
   	 #'(lambda (object)
   	     (funcall reader (proxy-location object) offset))
  
positive.code: 	 (subtypep (class-name class) 'proxy))
       (cdr (pcl::compute-class-precedence-list class))))
  
  
    (defmethod shared-initialize ((class proxy-class) names
  				&rest initargs &key size name)
      (declare (ignore initargs))
      (call-next-method)
      (when size
        (setf (slot-value class 'size) (first size))))
      
  
    (defmethod shared-initialize :after ((class proxy-class) names
  				       &rest initargs &key)
      (declare (ignore initargs names))
      (let* ((super (most-specific-proxy-superclass class))
  	   (actual-size
  	    (if (eq (class-name super) 'proxy)
  		0
  	      (proxy-class-instance-size super))))
        (dolist (slotd (class-slots class))
  	(when (eq (slot-definition-allocation slotd) :alien)
  	  (with-slots (offset type) slotd
  	    (setq actual-size (max actual-size (+ offset (size-of type)))))))
        (cond
         ((not (slot-boundp class 'size))
  	(setf (slot-value class 'size) actual-size))
         ((> actual-size (slot-value class 'size))
  	(warn "The actual size of class ~A is lager than specified" class)))))
  
  
    (defmethod direct-slot-definition-class ((class proxy-class) initargs)
      (case (getf initargs :allocation)
  
negative.code:      (unless (null-pointer-p location)
         (ensure-proxy-instance ',type-spec location ,weak-ref))))
  
  (deftype-method translate-to-alien
      proxy (type-spec instance &optional weak-ref)
    (if weak-ref
        `(proxy-location ,instance)
      `(funcall
        (proxy-class-copy (find-class ',type-spec))
        ',type-spec (proxy-location ,instance))))
  
  (deftype-method unreference-alien proxy (type-spec location)
    `(funcall (proxy-class-free (find-class ',type-spec)) ',type-spec ,location))
  
  (defun proxy-instance-size (proxy)
    (proxy-class-size (class-of proxy)))
  
  ;;;; Metaclass used for subclasses of proxy
  
  (eval-when (:compile-toplevel :load-toplevel :execute)
    (defclass proxy-class (virtual-slot-class)
      ((size :reader proxy-class-size)
       (copy :reader proxy-class-copy)
       (free :reader proxy-class-free)))
  
    (defclass direct-alien-slot-definition (direct-virtual-slot-definition)
      ((allocation :initform :alien)
       (offset :reader slot-definition-offset :initarg :offset)))
    
    (defclass effective-alien-slot-definition (effective-virtual-slot-definition)
      ((offset :reader slot-definition-offset)))
    
    (defclass effective-virtual-alien-slot-definition
      (effective-virtual-slot-definition))
  
  
    (defmethod most-specific-proxy-superclass ((class proxy-class))
      (find-if
  