-(defun foreign-location (instance)
- #-clisp(slot-value instance 'location)
- #+clisp(gethash instance *foreign-instance-locations*))
+#?-(or (sbcl>= 0 9 17) (featurep :clisp))
+(progn
+ (defun foreign-location (instance)
+ (slot-value instance '%location))
+
+ (defun (setf foreign-location) (location instance)
+ (setf (slot-value instance '%location) location))
+
+ (defun proxy-valid-p (instance)
+ (slot-boundp instance '%location)))
+
+#?(or (sbcl>= 0 9 17) (featurep :clisp))
+(progn
+ (defun foreign-location (instance)
+ (gethash instance *foreign-instance-locations*))
+
+ (defun (setf foreign-location) (location instance)
+ (setf (gethash instance *foreign-instance-locations*) location))