X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=mop.lisp;h=bbd6604adfe6a7356a5d050be84d1645d5c5c34c;hb=2710f01699cb548df453b64786a2eb0e711315a5;hp=d607bb181c96371ef653fb1150141a7f0a619c6e;hpb=4d2fa03e3e02b41c8aeb10971bde21d263ee3ffb;p=hyperobject.git diff --git a/mop.lisp b/mop.lisp index d607bb1..bbd6604 100644 --- a/mop.lisp +++ b/mop.lisp @@ -11,7 +11,7 @@ ;;;; in Text, HTML, and XML formats. This includes hyperlinking ;;;; capability and sub-objects. ;;;; -;;;; $Id: mop.lisp,v 1.31 2003/03/29 20:41:04 kevin Exp $ +;;;; $Id: mop.lisp,v 1.36 2003/04/01 16:56:46 kevin Exp $ ;;;; ;;;; This file is Copyright (c) 2000-2002 by Kevin M. Rosenberg ;;;; @@ -194,7 +194,7 @@ (defmethod compute-effective-slot-definition :around ((cl hyperobject-class) #+(or allegro lispworks) name dsds) - #+allergo (declare (ignore name)) + #+allegro (declare (ignore name)) (let* ((dsd (car dsds)) (value-type (canonicalize-value-type (slot-value dsd 'value-type)))) (multiple-value-bind (sql-type length) (value-type-to-sql-type value-type) @@ -281,7 +281,11 @@ (setf (slot-value ,the-instance ,the-slot-name) (,reader ,@keys))))) -#+(or sbcl scl cmu) +#+lispworks +(defun intern-eql-specializer (slot) + `(eql ,slot)) + +#+(or sbcl scl cmu lispworks) (defun ensure-lazy-reader (class-name slot-name reader &rest reader-keys) (let ((keys nil) (gf (ensure-generic-function 'slot-unbound))) @@ -299,11 +303,11 @@ (add-method gf (apply #'make-instance (generic-function-method-class gf) - ':specializers (list (intern-eql-specializer class-name) + ':specializers (list (class-of (find-class class-name)) (find-class class-name) (intern-eql-specializer slot-name)) ':lambda-list '(the-class the-instance the-slot-name) - ':function (eval `(function ,method-lambda)) + ':function (compile nil method-lambda) init-args-values))))) (defun finalize-subobjects (cl) @@ -322,12 +326,12 @@ nil (cdr subobj-def))))) (unless (eq (lookup subobject) t) - #-(or sbcl cmu scl) + #-(or sbcl cmu scl lispworks) (eval `(hyperobject::def-lazy-reader ,(name-class subobject) ,(name-slot subobject) ,(lookup subobject) ,@(lookup-keys subobject))) - #+(or sbcl cmu scl) + #+(or sbcl cmu scl lispworks) (apply #'ensure-lazy-reader (name-class subobject) (name-slot subobject) (lookup subobject) (lookup-keys subobject)) )