From 9c6f7a6f3559a32d75d15c3ae9d31b0db0e2acb3 Mon Sep 17 00:00:00 2001 From: "Kevin M. Rosenberg" Date: Tue, 29 Apr 2003 01:35:58 +0000 Subject: [PATCH 01/16] r4672: Auto commit for Debian build --- attrib-class.lisp | 10 ++++++---- debian/changelog | 7 +++++++ 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/attrib-class.lisp b/attrib-class.lisp index 1c15e34..02bfb45 100644 --- a/attrib-class.lisp +++ b/attrib-class.lisp @@ -7,7 +7,7 @@ ;;;; Programmer: Kevin M. Rosenberg ;;;; Date Started: Apr 2000 ;;;; -;;;; $Id: attrib-class.lisp,v 1.6 2003/04/28 23:51:59 kevin Exp $ +;;;; $Id: attrib-class.lisp,v 1.7 2003/04/29 01:35:58 kevin Exp $ ;;;; ;;;; This file, part of KMRCL, is Copyright (c) 2002 by Kevin M. Rosenberg ;;;; @@ -41,9 +41,11 @@ on example from AMOP")) (superclass kmr-mop:standard-class)) t) -(defmethod kmr-mop:direct-slot-definition-class ((cl attributes-class) - &rest iargs &key attributes) - (declare (ignore attributes)) +(defmethod kmr-mop:direct-slot-definition-class ((cl attributes-class) + #+(or sbcl cmu scl lispworks) + initargs + #+(or allegro) + &rest iargs) ;; (format t "attributes:~s iargs:~s~%" attributes iargs) (kmr-mop:find-class 'attributes-dsd)) diff --git a/debian/changelog b/debian/changelog index 075394f..9acc888 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +cl-kmrcl (1.32-1) unstable; urgency=low + + * Vary signature of DIRECT-SLOT-DEFINITION-CLASS depending on + implementation + + -- Kevin M. Rosenberg Mon, 28 Apr 2003 19:35:37 -0600 + cl-kmrcl (1.31-1) unstable; urgency=low * New upstream -- 2.34.1 From a2ea2c56892d633ce43a3a4805e05f55e52b6596 Mon Sep 17 00:00:00 2001 From: "Kevin M. Rosenberg" Date: Tue, 29 Apr 2003 01:39:40 +0000 Subject: [PATCH 02/16] r4673: Auto commit for Debian build --- attrib-class.lisp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/attrib-class.lisp b/attrib-class.lisp index 02bfb45..ee88042 100644 --- a/attrib-class.lisp +++ b/attrib-class.lisp @@ -7,7 +7,7 @@ ;;;; Programmer: Kevin M. Rosenberg ;;;; Date Started: Apr 2000 ;;;; -;;;; $Id: attrib-class.lisp,v 1.7 2003/04/29 01:35:58 kevin Exp $ +;;;; $Id: attrib-class.lisp,v 1.8 2003/04/29 01:39:40 kevin Exp $ ;;;; ;;;; This file, part of KMRCL, is Copyright (c) 2002 by Kevin M. Rosenberg ;;;; @@ -44,8 +44,7 @@ on example from AMOP")) (defmethod kmr-mop:direct-slot-definition-class ((cl attributes-class) #+(or sbcl cmu scl lispworks) initargs - #+(or allegro) - &rest iargs) + #+(or allegro) &rest #+(or allegro) iargs) ;; (format t "attributes:~s iargs:~s~%" attributes iargs) (kmr-mop:find-class 'attributes-dsd)) -- 2.34.1 From fff759278b0089e16c650fe7023b41eeafee30e2 Mon Sep 17 00:00:00 2001 From: "Kevin M. Rosenberg" Date: Tue, 29 Apr 2003 01:55:26 +0000 Subject: [PATCH 03/16] r4675: Auto commit for Debian build --- tests.lisp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/tests.lisp b/tests.lisp index 56eb2a5..a84404c 100644 --- a/tests.lisp +++ b/tests.lisp @@ -7,7 +7,7 @@ ;;;; Author: Kevin M. Rosenberg ;;;; Date Started: Apr 2003 ;;;; -;;;; $Id: tests.lisp,v 1.4 2003/04/29 00:49:09 kevin Exp $ +;;;; $Id: tests.lisp,v 1.5 2003/04/29 01:55:26 kevin Exp $ ;;;; ;;;; This file is Copyright (c) 2000-2002 by Kevin M. Rosenberg ;;;; @@ -20,10 +20,6 @@ (rem-all-tests) -(when (find-package '#:kmr-mop) - (pushnew :kmrtest-mop cl:*features*)) - -(deftest p1 t t) (deftest str.0 (substitute-chars-strings "" nil) "") (deftest str.1 (substitute-chars-strings "abcd" nil) "abcd") @@ -49,6 +45,10 @@ (deftest str.16 (nstring-trim-last-character "a") "") (deftest str.17 (nstring-trim-last-character "ab") "a") +(eval-when (:compile-toplevel :load-toplevel :execute) + (when (find-package '#:kmr-mop) + (pushnew :kmrtest-mop cl:*features*))) + #+kmrtest-mop (progn (defclass credit-rating () @@ -87,4 +87,5 @@ ) ;; kmrcl-mop #+kmrtest-mop -(setq cl:*features* (delete :kmrtest-mop cl:*features*)) +(eval-when (:compile-toplevel :load-toplevel :execute) + (setq cl:*features* (delete :kmrtest-mop cl:*features*))) -- 2.34.1 From 5ef3317938a27c4fe0341ebe1ccc3fb453901cba Mon Sep 17 00:00:00 2001 From: "Kevin M. Rosenberg" Date: Tue, 29 Apr 2003 03:54:40 +0000 Subject: [PATCH 04/16] r4676: Auto commit for Debian build --- attrib-class.lisp | 13 +++++-------- kmrcl.asd | 9 ++++++--- mop.lisp | 11 +++++++++-- 3 files changed, 20 insertions(+), 13 deletions(-) diff --git a/attrib-class.lisp b/attrib-class.lisp index ee88042..3e79325 100644 --- a/attrib-class.lisp +++ b/attrib-class.lisp @@ -7,7 +7,7 @@ ;;;; Programmer: Kevin M. Rosenberg ;;;; Date Started: Apr 2000 ;;;; -;;;; $Id: attrib-class.lisp,v 1.8 2003/04/29 01:39:40 kevin Exp $ +;;;; $Id: attrib-class.lisp,v 1.9 2003/04/29 03:50:42 kevin Exp $ ;;;; ;;;; This file, part of KMRCL, is Copyright (c) 2002 by Kevin M. Rosenberg ;;;; @@ -41,16 +41,13 @@ on example from AMOP")) (superclass kmr-mop:standard-class)) t) -(defmethod kmr-mop:direct-slot-definition-class ((cl attributes-class) - #+(or sbcl cmu scl lispworks) - initargs - #+(or allegro) &rest #+(or allegro) iargs) - ;; (format t "attributes:~s iargs:~s~%" attributes iargs) +(defmethod kmr-mop:direct-slot-definition-class ((cl attributes-class) #+kmr-normal-dsdc &rest initargs) + (declare (ignore initargs)) (kmr-mop:find-class 'attributes-dsd)) (defmethod kmr-mop:compute-effective-slot-definition :around - ((cl attributes-class) #+kmr-named-cesd name dsds) - #+kmr-named-cesd (declare (ignore name)) + ((cl attributes-class) #+kmr-normal-cesd name dsds) + #+kmr-normal-cesd (declare (ignore name)) (apply #'make-instance 'attributes-esd :attributes (remove-duplicates (mapappend #'dsd-attributes dsds)) diff --git a/kmrcl.asd b/kmrcl.asd index af360d8..4c2d1c0 100644 --- a/kmrcl.asd +++ b/kmrcl.asd @@ -7,7 +7,7 @@ ;;;; Programmer: Kevin M. Rosenberg ;;;; Date Started: Apr 2000 ;;;; -;;;; $Id: kmrcl.asd,v 1.26 2003/04/29 00:23:21 kevin Exp $ +;;;; $Id: kmrcl.asd,v 1.27 2003/04/29 03:54:40 kevin Exp $ ;;;; ;;;; This file, part of KMRCL, is Copyright (c) 2002 by Kevin M. Rosenberg ;;;; @@ -19,7 +19,9 @@ (defpackage #:kmrcl-system (:use #:asdf #:cl)) (in-package #:kmrcl-system) -#+(or allegro cmucl lispworks sbcl scl) (pushnew :kmr-mop cl:*features*) +#+(or allegro cmucl lispworks sbcl scl) +(eval-when (:compile-toplevel :load-toplevel :execute) + (pushnew :kmr-mop cl:*features*)) (defsystem kmrcl :name "kmrcl" @@ -56,4 +58,5 @@ (oos 'test-op 'kmrcl-tests)) #+kmr-mop -(setq cl:*features* (delete :kmr-mop cl:*features*)) +(eval-when (:compile-toplevel :load-toplevel :execute) + (setq cl:*features* (delete :kmr-mop cl:*features*))) diff --git a/mop.lisp b/mop.lisp index 5e4ba96..995b368 100644 --- a/mop.lisp +++ b/mop.lisp @@ -7,7 +7,7 @@ ;;;; Programmer: Kevin M. Rosenberg ;;;; Date Started: Apr 2003 ;;;; -;;;; $Id: mop.lisp,v 1.1 2003/04/29 00:26:21 kevin Exp $ +;;;; $Id: mop.lisp,v 1.2 2003/04/29 03:50:42 kevin Exp $ ;;;; ;;;; This file, part of KMRCL, is Copyright (c) 2002 by Kevin M. Rosenberg ;;;; @@ -116,5 +116,12 @@ (ensure-generic-function 'compute-effective-slot-definition))) 3) - (pushnew :kmr-named-cesd cl:*features*))) + (pushnew :kmr-normal-cesd cl:*features*))) + +(eval-when (:compile-toplevel :load-toplevel :execute) + (when (>= (length (generic-function-lambda-list + (ensure-generic-function + 'direct-slot-definition-class))) + 3) + (pushnew :kmr-normal-dsdc cl:*features*))) -- 2.34.1 From 95e781f9c555f193a471b652c3c30af80d58ac4a Mon Sep 17 00:00:00 2001 From: "Kevin M. Rosenberg" Date: Tue, 29 Apr 2003 03:55:49 +0000 Subject: [PATCH 05/16] r4678: Auto commit for Debian build --- kmrcl.asd | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/kmrcl.asd b/kmrcl.asd index 4c2d1c0..3665dc5 100644 --- a/kmrcl.asd +++ b/kmrcl.asd @@ -7,7 +7,7 @@ ;;;; Programmer: Kevin M. Rosenberg ;;;; Date Started: Apr 2000 ;;;; -;;;; $Id: kmrcl.asd,v 1.27 2003/04/29 03:54:40 kevin Exp $ +;;;; $Id: kmrcl.asd,v 1.28 2003/04/29 03:55:49 kevin Exp $ ;;;; ;;;; This file, part of KMRCL, is Copyright (c) 2002 by Kevin M. Rosenberg ;;;; @@ -19,9 +19,8 @@ (defpackage #:kmrcl-system (:use #:asdf #:cl)) (in-package #:kmrcl-system) -#+(or allegro cmucl lispworks sbcl scl) -(eval-when (:compile-toplevel :load-toplevel :execute) - (pushnew :kmr-mop cl:*features*)) +#+(or allegro cmu lispworks sbcl scl) +(pushnew :kmr-mop cl:*features*) (defsystem kmrcl :name "kmrcl" @@ -58,5 +57,5 @@ (oos 'test-op 'kmrcl-tests)) #+kmr-mop -(eval-when (:compile-toplevel :load-toplevel :execute) - (setq cl:*features* (delete :kmr-mop cl:*features*))) +(setq cl:*features* (delete :kmr-mop cl:*features*)) + -- 2.34.1 From 152fd9dc7d5a0fb8079f3b18ecafff6aeb836a75 Mon Sep 17 00:00:00 2001 From: "Kevin M. Rosenberg" Date: Tue, 29 Apr 2003 04:56:58 +0000 Subject: [PATCH 06/16] r4679: Auto commit for Debian build --- equal.lisp | 34 ++++------------------- kmrcl.asd | 7 ++--- mop.lisp | 80 ++++++++++++++++++++++++++---------------------------- 3 files changed, 47 insertions(+), 74 deletions(-) diff --git a/equal.lisp b/equal.lisp index 0e98719..09ff47a 100644 --- a/equal.lisp +++ b/equal.lisp @@ -7,7 +7,7 @@ ;;;; Programmer: Kevin M. Rosenberg ;;;; Date Started: Apr 2000 ;;;; -;;;; $Id: equal.lisp,v 1.12 2003/03/25 13:41:54 kevin Exp $ +;;;; $Id: equal.lisp,v 1.13 2003/04/29 04:56:58 kevin Exp $ ;;;; ;;;; This file, part of KMRCL, is Copyright (c) 2002 by Kevin M. Rosenberg ;;;; @@ -87,23 +87,11 @@ (return-from test nil))) (return-from test t))) -#+sbcl -(eval-when (:compile-toplevel :load-toplevel :execute) - (if (find-package 'sb-mop) - (pushnew :sb-mop cl:*features*) - (pushnew :sb-pcl cl:*features*))) - (defun class-slot-names (c-name) "Given a CLASS-NAME, returns a list of the slots in the class." - #+(or allegro lispworks scl) - (mapcar #'clos:slot-definition-name - (clos:class-slots (find-class c-name))) - #+sbcl-mop (mapcar #'sb-mop::slot-definition-name - (sb-mop:class-slots (find-class c-name))) - #+sbcl-pcl (mapcar #'sb-pcl::slot-definition-name - (sb-pcl:class-slots (sb-pcl::find-class c-name))) - #+cmu (mapcar #'pcl::slot-definition-name - (pcl:class-slots (pcl:find-class c-name))) + #+(or allegro cmu lispworks sbcl scl) + (mapcar #'kmr-mop:slot-definition-name + (kmr-mop:class-slots (kmr-mop:find-class c-name))) #+mcl (let* ((class (find-class c-name nil))) (when (typep class 'standard-class) @@ -118,12 +106,8 @@ #+allegro (class-slot-names s-name) #+lispworks (structure:structure-class-slot-names (find-class s-name)) - #+sbcl-mop (mapcar #'sb-mop::slot-definition-name - (sb-mop:class-slots (find-class s-name))) - #+sbcl-pcl (mapcar #'sb-pcl::slot-definition-name - (sb-pcl:class-slots (sb-pcl::find-class s-name))) - #+cmu (mapcar #'pcl::slot-definition-name - (pcl:class-slots (pcl:find-class s-name))) + #+(or sbcl cmu) (mapcar #'kmr-mop:slot-definition-name + (kmr-mop:class-slots (kmr-mop:find-class s-name))) #+scl (mapcar #'kernel:dsd-name (kernel:dd-slots (kernel:layout-info @@ -135,12 +119,6 @@ (error "structure-slot-names is not defined on this platform") ) -#+sbcl -(eval-when (:compile-toplevel :load-toplevel :execute) - (if (find-package 'sb-mop) - (setq cl:*features* (delete :sb-mop cl:*features*)) - (setq cl:*features* (delete :sb-pcl cl:*features*)))) - (defun function-to-string (obj) "Returns the lambda code for a function. Relies on Allegro implementation-dependent features." diff --git a/kmrcl.asd b/kmrcl.asd index 3665dc5..947b33a 100644 --- a/kmrcl.asd +++ b/kmrcl.asd @@ -7,7 +7,7 @@ ;;;; Programmer: Kevin M. Rosenberg ;;;; Date Started: Apr 2000 ;;;; -;;;; $Id: kmrcl.asd,v 1.28 2003/04/29 03:55:49 kevin Exp $ +;;;; $Id: kmrcl.asd,v 1.29 2003/04/29 04:56:58 kevin Exp $ ;;;; ;;;; This file, part of KMRCL, is Copyright (c) 2002 by Kevin M. Rosenberg ;;;; @@ -38,7 +38,6 @@ (:file "io" :depends-on ("macros")) (:file "console" :depends-on ("macros")) (:file "strings" :depends-on ("macros")) - (:file "equal" :depends-on ("macros")) (:file "buff-input" :depends-on ("macros")) (:file "telnet-server" :depends-on ("macros")) (:file "random" :depends-on ("macros")) @@ -47,6 +46,7 @@ (:file "math" :depends-on ("macros")) #+kmr-mop (:file "mop" :depends-on ("macros")) #+kmr-mop (:file "attrib-class" :depends-on ("seqs" "mop")) + (:file "equal" :depends-on ("macros" #+kmr-mop "mop")) (:file "web-utils" :depends-on ("macros")) (:file "xml-utils" :depends-on ("macros"))) ) @@ -56,6 +56,3 @@ (oos 'load-op 'kmrcl-tests) (oos 'test-op 'kmrcl-tests)) -#+kmr-mop -(setq cl:*features* (delete :kmr-mop cl:*features*)) - diff --git a/mop.lisp b/mop.lisp index 995b368..9a571b5 100644 --- a/mop.lisp +++ b/mop.lisp @@ -7,7 +7,7 @@ ;;;; Programmer: Kevin M. Rosenberg ;;;; Date Started: Apr 2003 ;;;; -;;;; $Id: mop.lisp,v 1.2 2003/04/29 03:50:42 kevin Exp $ +;;;; $Id: mop.lisp,v 1.3 2003/04/29 04:56:58 kevin Exp $ ;;;; ;;;; This file, part of KMRCL, is Copyright (c) 2002 by Kevin M. Rosenberg ;;;; @@ -58,46 +58,44 @@ (in-package #:kmr-mop) -(eval-when (:compile-toplevel :load-toplevel :execute) - (shadowing-import - #+allegro - '(excl::compute-effective-slot-definition-initargs) - #+lispworks - '(clos::compute-effective-slot-definition-initargs) - #+kmr-sbcl-mop - '(sb-pcl::compute-effective-slot-definition-initargs) - #+kmr-sbcl-pcl - '(sb-pcl:class-of sb-pcl:class-name sb-pcl:class-slots sb-pcl:find-class - sb-pcl::standard-class - sb-pcl:slot-definition-name sb-pcl::finalize-inheritance - sb-pcl::standard-direct-slot-definition - sb-pcl::standard-effective-slot-definition sb-pcl::validate-superclass - sb-pcl::direct-slot-definition-class sb-pcl::compute-effective-slot-definition - sb-pcl::compute-effective-slot-definition-initargs - sb-pcl::slot-value-using-class - sb-pcl:class-prototype sb-pcl:generic-function-method-class sb-pcl:intern-eql-specializer - sb-pcl:make-method-lambda sb-pcl:generic-function-lambda-list - sb-pcl::compute-slots) - #+kmr-cmucl-mop - '(pcl::compute-effective-slot-definition-initargs) - #+kmr-cmucl-pcl - '(pcl:class-of pcl:class-name pcl:class-slots pcl:find-class pcl::standard-class - pcl::slot-definition-name pcl:finalize-inheritance - pcl::standard-direct-slot-definition pcl::standard-effective-slot-definition - pcl::validate-superclass pcl:direct-slot-definition-class - pcl:compute-effective-slot-definition - pcl::compute-effective-slot-definition-initargs - pcl::slot-value-using-class - pcl:class-prototype pcl:generic-function-method-class pcl:intern-eql-specializer - pcl:make-method-lambda pcl:generic-function-lambda-list - pcl::compute-slots) - #+scl - '(clos::compute-effective-slot-definition-initargs - clos::class-prototype - ;; note: make-method-lambda is not fbound - ) - '#:kmr-mop)) - +(shadowing-import + #+allegro + '(excl::compute-effective-slot-definition-initargs) + #+lispworks + '(clos::compute-effective-slot-definition-initargs) + #+kmr-sbcl-mop + '(sb-pcl::compute-effective-slot-definition-initargs) + #+kmr-sbcl-pcl + '(sb-pcl:class-of sb-pcl:class-name sb-pcl:class-slots sb-pcl:find-class + sb-pcl::standard-class + sb-pcl:slot-definition-name sb-pcl::finalize-inheritance + sb-pcl::standard-direct-slot-definition + sb-pcl::standard-effective-slot-definition sb-pcl::validate-superclass + sb-pcl::direct-slot-definition-class sb-pcl::compute-effective-slot-definition + sb-pcl::compute-effective-slot-definition-initargs + sb-pcl::slot-value-using-class + sb-pcl:class-prototype sb-pcl:generic-function-method-class sb-pcl:intern-eql-specializer + sb-pcl:make-method-lambda sb-pcl:generic-function-lambda-list + sb-pcl::compute-slots) + #+kmr-cmucl-mop + '(pcl::compute-effective-slot-definition-initargs) + #+kmr-cmucl-pcl + '(pcl:class-of pcl:class-name pcl:class-slots pcl:find-class pcl::standard-class + pcl::slot-definition-name pcl:finalize-inheritance + pcl::standard-direct-slot-definition pcl::standard-effective-slot-definition + pcl::validate-superclass pcl:direct-slot-definition-class + pcl:compute-effective-slot-definition + pcl::compute-effective-slot-definition-initargs + pcl::slot-value-using-class + pcl:class-prototype pcl:generic-function-method-class pcl:intern-eql-specializer + pcl:make-method-lambda pcl:generic-function-lambda-list + pcl::compute-slots) + #+scl + '(clos::compute-effective-slot-definition-initargs + clos::class-prototype + ;; note: make-method-lambda is not fbound + ) + '#:kmr-mop) #+sbcl (eval-when (:compile-toplevel :load-toplevel :execute) -- 2.34.1 From f0519dd7c4b8c99ace8accc9f7ed9c55136151b0 Mon Sep 17 00:00:00 2001 From: "Kevin M. Rosenberg" Date: Tue, 29 Apr 2003 04:59:51 +0000 Subject: [PATCH 07/16] r4680: Auto commit for Debian build --- mop.lisp | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/mop.lisp b/mop.lisp index 9a571b5..401a55d 100644 --- a/mop.lisp +++ b/mop.lisp @@ -7,7 +7,7 @@ ;;;; Programmer: Kevin M. Rosenberg ;;;; Date Started: Apr 2003 ;;;; -;;;; $Id: mop.lisp,v 1.3 2003/04/29 04:56:58 kevin Exp $ +;;;; $Id: mop.lisp,v 1.4 2003/04/29 04:59:51 kevin Exp $ ;;;; ;;;; This file, part of KMRCL, is Copyright (c) 2002 by Kevin M. Rosenberg ;;;; @@ -41,20 +41,7 @@ #+kmr-cmucl-mop #:mop #+allegro #:mop #+lispworks #:clos - #+scl #:clos) - (:export - #:class-of #:class-name #:class-slots #:find-class - #:standard-class - #:slot-definition-name #:finalize-inheritance - #:standard-direct-slot-definition - #:standard-effective-slot-definition #:validate-superclass - #:direct-slot-definition-class #:compute-effective-slot-definition - #:compute-effective-slot-definition-initargs - #:slot-value-using-class - #:class-prototype #:generic-function-method-class #:intern-eql-specializer - #:make-method-lambda #:generic-function-lambda-list - #:compute-slots) - ) + #+scl #:clos)) (in-package #:kmr-mop) @@ -97,6 +84,19 @@ ) '#:kmr-mop) +(export '(#:class-of #:class-name #:class-slots #:find-class + #:standard-class + #:slot-definition-name #:finalize-inheritance + #:standard-direct-slot-definition + #:standard-effective-slot-definition #:validate-superclass + #:direct-slot-definition-class #:compute-effective-slot-definition + #:compute-effective-slot-definition-initargs + #:slot-value-using-class + #:class-prototype #:generic-function-method-class #:intern-eql-specializer + #:make-method-lambda #:generic-function-lambda-list + #:compute-slots)) + + #+sbcl (eval-when (:compile-toplevel :load-toplevel :execute) (if (find-package 'sb-mop) -- 2.34.1 From e7029a2475adb009ed1b80d400429dcbd35f34ae Mon Sep 17 00:00:00 2001 From: "Kevin M. Rosenberg" Date: Tue, 29 Apr 2003 05:02:21 +0000 Subject: [PATCH 08/16] r4681: Auto commit for Debian build --- mop.lisp | 131 +++++++++++++++++++++++++++---------------------------- 1 file changed, 64 insertions(+), 67 deletions(-) diff --git a/mop.lisp b/mop.lisp index 401a55d..b5a5ef1 100644 --- a/mop.lisp +++ b/mop.lisp @@ -7,7 +7,7 @@ ;;;; Programmer: Kevin M. Rosenberg ;;;; Date Started: Apr 2003 ;;;; -;;;; $Id: mop.lisp,v 1.4 2003/04/29 04:59:51 kevin Exp $ +;;;; $Id: mop.lisp,v 1.5 2003/04/29 05:02:21 kevin Exp $ ;;;; ;;;; This file, part of KMRCL, is Copyright (c) 2002 by Kevin M. Rosenberg ;;;; @@ -45,81 +45,78 @@ (in-package #:kmr-mop) -(shadowing-import - #+allegro - '(excl::compute-effective-slot-definition-initargs) - #+lispworks - '(clos::compute-effective-slot-definition-initargs) - #+kmr-sbcl-mop - '(sb-pcl::compute-effective-slot-definition-initargs) - #+kmr-sbcl-pcl - '(sb-pcl:class-of sb-pcl:class-name sb-pcl:class-slots sb-pcl:find-class - sb-pcl::standard-class - sb-pcl:slot-definition-name sb-pcl::finalize-inheritance - sb-pcl::standard-direct-slot-definition - sb-pcl::standard-effective-slot-definition sb-pcl::validate-superclass - sb-pcl::direct-slot-definition-class sb-pcl::compute-effective-slot-definition - sb-pcl::compute-effective-slot-definition-initargs - sb-pcl::slot-value-using-class - sb-pcl:class-prototype sb-pcl:generic-function-method-class sb-pcl:intern-eql-specializer - sb-pcl:make-method-lambda sb-pcl:generic-function-lambda-list - sb-pcl::compute-slots) - #+kmr-cmucl-mop - '(pcl::compute-effective-slot-definition-initargs) - #+kmr-cmucl-pcl - '(pcl:class-of pcl:class-name pcl:class-slots pcl:find-class pcl::standard-class - pcl::slot-definition-name pcl:finalize-inheritance - pcl::standard-direct-slot-definition pcl::standard-effective-slot-definition - pcl::validate-superclass pcl:direct-slot-definition-class - pcl:compute-effective-slot-definition - pcl::compute-effective-slot-definition-initargs - pcl::slot-value-using-class - pcl:class-prototype pcl:generic-function-method-class pcl:intern-eql-specializer - pcl:make-method-lambda pcl:generic-function-lambda-list - pcl::compute-slots) - #+scl - '(clos::compute-effective-slot-definition-initargs - clos::class-prototype - ;; note: make-method-lambda is not fbound - ) - '#:kmr-mop) - -(export '(#:class-of #:class-name #:class-slots #:find-class - #:standard-class - #:slot-definition-name #:finalize-inheritance - #:standard-direct-slot-definition - #:standard-effective-slot-definition #:validate-superclass - #:direct-slot-definition-class #:compute-effective-slot-definition - #:compute-effective-slot-definition-initargs - #:slot-value-using-class - #:class-prototype #:generic-function-method-class #:intern-eql-specializer - #:make-method-lambda #:generic-function-lambda-list - #:compute-slots)) - - -#+sbcl (eval-when (:compile-toplevel :load-toplevel :execute) + (shadowing-import + #+allegro + '(excl::compute-effective-slot-definition-initargs) + #+lispworks + '(clos::compute-effective-slot-definition-initargs) + #+kmr-sbcl-mop + '(sb-pcl::compute-effective-slot-definition-initargs) + #+kmr-sbcl-pcl + '(sb-pcl:class-of sb-pcl:class-name sb-pcl:class-slots sb-pcl:find-class + sb-pcl::standard-class + sb-pcl:slot-definition-name sb-pcl::finalize-inheritance + sb-pcl::standard-direct-slot-definition + sb-pcl::standard-effective-slot-definition sb-pcl::validate-superclass + sb-pcl::direct-slot-definition-class sb-pcl::compute-effective-slot-definition + sb-pcl::compute-effective-slot-definition-initargs + sb-pcl::slot-value-using-class + sb-pcl:class-prototype sb-pcl:generic-function-method-class sb-pcl:intern-eql-specializer + sb-pcl:make-method-lambda sb-pcl:generic-function-lambda-list + sb-pcl::compute-slots) + #+kmr-cmucl-mop + '(pcl::compute-effective-slot-definition-initargs) + #+kmr-cmucl-pcl + '(pcl:class-of pcl:class-name pcl:class-slots pcl:find-class pcl::standard-class + pcl::slot-definition-name pcl:finalize-inheritance + pcl::standard-direct-slot-definition pcl::standard-effective-slot-definition + pcl::validate-superclass pcl:direct-slot-definition-class + pcl:compute-effective-slot-definition + pcl::compute-effective-slot-definition-initargs + pcl::slot-value-using-class + pcl:class-prototype pcl:generic-function-method-class pcl:intern-eql-specializer + pcl:make-method-lambda pcl:generic-function-lambda-list + pcl::compute-slots) + #+scl + '(clos::compute-effective-slot-definition-initargs + clos::class-prototype + ;; note: make-method-lambda is not fbound + ) + '#:kmr-mop) + + (export '(#:class-of #:class-name #:class-slots #:find-class + #:standard-class + #:slot-definition-name #:finalize-inheritance + #:standard-direct-slot-definition + #:standard-effective-slot-definition #:validate-superclass + #:direct-slot-definition-class #:compute-effective-slot-definition + #:compute-effective-slot-definition-initargs + #:slot-value-using-class + #:class-prototype #:generic-function-method-class #:intern-eql-specializer + #:make-method-lambda #:generic-function-lambda-list + #:compute-slots)) + + #+sbcl (if (find-package 'sb-mop) (setq cl:*features* (delete :kmr-sbcl-mop cl:*features*)) - (setq cl:*features* (delete :kmr-sbcl-pcl cl:*features*)))) - -#+cmu -(eval-when (:compile-toplevel :load-toplevel :execute) + (setq cl:*features* (delete :kmr-sbcl-pcl cl:*features*))) + + #+cmu (if (find-package 'mop) (setq cl:*features* (delete :kmr-cmucl-mop cl:*features*)) - (setq cl:*features* (delete :kmr-cmucl-pcl cl:*features*)))) - -(eval-when (:compile-toplevel :load-toplevel :execute) + (setq cl:*features* (delete :kmr-cmucl-pcl cl:*features*))) + (when (>= (length (generic-function-lambda-list (ensure-generic-function 'compute-effective-slot-definition))) 3) - (pushnew :kmr-normal-cesd cl:*features*))) - -(eval-when (:compile-toplevel :load-toplevel :execute) + (pushnew :kmr-normal-cesd cl:*features*)) + (when (>= (length (generic-function-lambda-list - (ensure-generic-function - 'direct-slot-definition-class))) + (ensure-generic-function + 'direct-slot-definition-class))) 3) - (pushnew :kmr-normal-dsdc cl:*features*))) + (pushnew :kmr-normal-dsdc cl:*features*)) + ) ;; eval-when -- 2.34.1 From 6ca9dc00716adc2e7739803e4cd404a516461ff0 Mon Sep 17 00:00:00 2001 From: "Kevin M. Rosenberg" Date: Tue, 29 Apr 2003 05:10:25 +0000 Subject: [PATCH 09/16] r4682: Auto commit for Debian build --- mop.lisp | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/mop.lisp b/mop.lisp index b5a5ef1..d7013cf 100644 --- a/mop.lisp +++ b/mop.lisp @@ -7,7 +7,7 @@ ;;;; Programmer: Kevin M. Rosenberg ;;;; Date Started: Apr 2003 ;;;; -;;;; $Id: mop.lisp,v 1.5 2003/04/29 05:02:21 kevin Exp $ +;;;; $Id: mop.lisp,v 1.6 2003/04/29 05:10:25 kevin Exp $ ;;;; ;;;; This file, part of KMRCL, is Copyright (c) 2002 by Kevin M. Rosenberg ;;;; @@ -82,20 +82,19 @@ '(clos::compute-effective-slot-definition-initargs clos::class-prototype ;; note: make-method-lambda is not fbound - ) - '#:kmr-mop) + )) - (export '(#:class-of #:class-name #:class-slots #:find-class - #:standard-class - #:slot-definition-name #:finalize-inheritance - #:standard-direct-slot-definition - #:standard-effective-slot-definition #:validate-superclass - #:direct-slot-definition-class #:compute-effective-slot-definition - #:compute-effective-slot-definition-initargs - #:slot-value-using-class - #:class-prototype #:generic-function-method-class #:intern-eql-specializer - #:make-method-lambda #:generic-function-lambda-list - #:compute-slots)) + (export '(class-of class-name class-slots find-class + standard-class + slot-definition-name finalize-inheritance + standard-direct-slot-definition + standard-effective-slot-definition validate-superclass + direct-slot-definition-class compute-effective-slot-definition + compute-effective-slot-definition-initargs + slot-value-using-class + class-prototype generic-function-method-class intern-eql-specializer + make-method-lambda generic-function-lambda-list + compute-slots)) #+sbcl (if (find-package 'sb-mop) -- 2.34.1 From c59bcb7e1dcdb2c2ec24422f6534a05da56e9bb5 Mon Sep 17 00:00:00 2001 From: "Kevin M. Rosenberg" Date: Tue, 29 Apr 2003 05:14:11 +0000 Subject: [PATCH 10/16] r4683: Auto commit for Debian build --- attrib-class.lisp | 4 ++-- mop.lisp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/attrib-class.lisp b/attrib-class.lisp index 3e79325..320354a 100644 --- a/attrib-class.lisp +++ b/attrib-class.lisp @@ -7,7 +7,7 @@ ;;;; Programmer: Kevin M. Rosenberg ;;;; Date Started: Apr 2000 ;;;; -;;;; $Id: attrib-class.lisp,v 1.9 2003/04/29 03:50:42 kevin Exp $ +;;;; $Id: attrib-class.lisp,v 1.10 2003/04/29 05:14:11 kevin Exp $ ;;;; ;;;; This file, part of KMRCL, is Copyright (c) 2002 by Kevin M. Rosenberg ;;;; @@ -51,7 +51,7 @@ on example from AMOP")) (apply #'make-instance 'attributes-esd :attributes (remove-duplicates (mapappend #'dsd-attributes dsds)) - (kmr-mop:compute-effective-slot-definition-initargs cl dsds)) + (kmr-mop::compute-effective-slot-definition-initargs cl dsds)) ) #+ignore diff --git a/mop.lisp b/mop.lisp index d7013cf..571b1f4 100644 --- a/mop.lisp +++ b/mop.lisp @@ -7,7 +7,7 @@ ;;;; Programmer: Kevin M. Rosenberg ;;;; Date Started: Apr 2003 ;;;; -;;;; $Id: mop.lisp,v 1.6 2003/04/29 05:10:25 kevin Exp $ +;;;; $Id: mop.lisp,v 1.7 2003/04/29 05:11:57 kevin Exp $ ;;;; ;;;; This file, part of KMRCL, is Copyright (c) 2002 by Kevin M. Rosenberg ;;;; @@ -90,7 +90,7 @@ standard-direct-slot-definition standard-effective-slot-definition validate-superclass direct-slot-definition-class compute-effective-slot-definition - compute-effective-slot-definition-initargs + #+allero excl::compute-effective-slot-definition-initargs slot-value-using-class class-prototype generic-function-method-class intern-eql-specializer make-method-lambda generic-function-lambda-list -- 2.34.1 From ab663bd390b95de44dd144fbeea504e0ed2e5d2d Mon Sep 17 00:00:00 2001 From: "Kevin M. Rosenberg" Date: Tue, 29 Apr 2003 05:54:24 +0000 Subject: [PATCH 11/16] r4684: Auto commit for Debian build --- mop.lisp | 49 +++++++++++++++++++++++++++++++++++++------------ 1 file changed, 37 insertions(+), 12 deletions(-) diff --git a/mop.lisp b/mop.lisp index 571b1f4..73f9499 100644 --- a/mop.lisp +++ b/mop.lisp @@ -7,7 +7,7 @@ ;;;; Programmer: Kevin M. Rosenberg ;;;; Date Started: Apr 2003 ;;;; -;;;; $Id: mop.lisp,v 1.7 2003/04/29 05:11:57 kevin Exp $ +;;;; $Id: mop.lisp,v 1.8 2003/04/29 05:54:24 kevin Exp $ ;;;; ;;;; This file, part of KMRCL, is Copyright (c) 2002 by Kevin M. Rosenberg ;;;; @@ -48,12 +48,31 @@ (eval-when (:compile-toplevel :load-toplevel :execute) (shadowing-import #+allegro - '(excl::compute-effective-slot-definition-initargs) + '(class-of class-name class-slots find-class mop::standard-class + mop::slot-definition-name mop:finalize-inheritance + mop::standard-direct-slot-definition mop::standard-effective-slot-definition + mop::validate-superclass mop:direct-slot-definition-class + mop:compute-effective-slot-definition + excl::compute-effective-slot-definition-initargs + mop::slot-value-using-class + mop:class-prototype mop:generic-function-method-class mop:intern-eql-specializer + mop:make-method-lambda mop:generic-function-lambda-list + mop::compute-slots + ;; note: make-method-lambda is not fbound + ) #+lispworks - '(clos::compute-effective-slot-definition-initargs) - #+kmr-sbcl-mop - '(sb-pcl::compute-effective-slot-definition-initargs) - #+kmr-sbcl-pcl + '(class-of class-name class-slots find-class + clos::standard-class + clos:slot-definition-name clos::finalize-inheritance + clos::standard-direct-slot-definition + clos::standard-effective-slot-definition clos::validate-superclass + clos::direct-slot-definition-class clos::compute-effective-slot-definition + clos::compute-effective-slot-definition-initargs + clos::slot-value-using-class + clos:class-prototype clos:generic-function-method-class clos:intern-eql-specializer + clos:make-method-lambda clos:generic-function-lambda-list + clos::compute-slots) + #+sbcl '(sb-pcl:class-of sb-pcl:class-name sb-pcl:class-slots sb-pcl:find-class sb-pcl::standard-class sb-pcl:slot-definition-name sb-pcl::finalize-inheritance @@ -65,9 +84,7 @@ sb-pcl:class-prototype sb-pcl:generic-function-method-class sb-pcl:intern-eql-specializer sb-pcl:make-method-lambda sb-pcl:generic-function-lambda-list sb-pcl::compute-slots) - #+kmr-cmucl-mop - '(pcl::compute-effective-slot-definition-initargs) - #+kmr-cmucl-pcl + #+cmu '(pcl:class-of pcl:class-name pcl:class-slots pcl:find-class pcl::standard-class pcl::slot-definition-name pcl:finalize-inheritance pcl::standard-direct-slot-definition pcl::standard-effective-slot-definition @@ -79,8 +96,16 @@ pcl:make-method-lambda pcl:generic-function-lambda-list pcl::compute-slots) #+scl - '(clos::compute-effective-slot-definition-initargs - clos::class-prototype + '(class-of class-name class-slots find-class clos::standard-class + clos::slot-definition-name clos:finalize-inheritance + clos::standard-direct-slot-definition clos::standard-effective-slot-definition + clos::validate-superclass clos:direct-slot-definition-class + clos:compute-effective-slot-definition + clos::compute-effective-slot-definition-initargs + clos::slot-value-using-class + clos:class-prototype clos:generic-function-method-class clos:intern-eql-specializer + clos:make-method-lambda clos:generic-function-lambda-list + clos::compute-slots ;; note: make-method-lambda is not fbound )) @@ -90,7 +115,7 @@ standard-direct-slot-definition standard-effective-slot-definition validate-superclass direct-slot-definition-class compute-effective-slot-definition - #+allero excl::compute-effective-slot-definition-initargs + compute-effective-slot-definition-initargs slot-value-using-class class-prototype generic-function-method-class intern-eql-specializer make-method-lambda generic-function-lambda-list -- 2.34.1 From 858422593b76417361614970d9b84f462f58b6d9 Mon Sep 17 00:00:00 2001 From: "Kevin M. Rosenberg" Date: Tue, 29 Apr 2003 05:57:24 +0000 Subject: [PATCH 12/16] r4685: Auto commit for Debian build --- mop.lisp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/mop.lisp b/mop.lisp index 73f9499..cad16f3 100644 --- a/mop.lisp +++ b/mop.lisp @@ -7,7 +7,7 @@ ;;;; Programmer: Kevin M. Rosenberg ;;;; Date Started: Apr 2003 ;;;; -;;;; $Id: mop.lisp,v 1.8 2003/04/29 05:54:24 kevin Exp $ +;;;; $Id: mop.lisp,v 1.9 2003/04/29 05:57:24 kevin Exp $ ;;;; ;;;; This file, part of KMRCL, is Copyright (c) 2002 by Kevin M. Rosenberg ;;;; @@ -73,7 +73,10 @@ clos:make-method-lambda clos:generic-function-lambda-list clos::compute-slots) #+sbcl - '(sb-pcl:class-of sb-pcl:class-name sb-pcl:class-slots sb-pcl:find-class + '(#+kmr-sbcl-mop class-of #-kmr-sbcl-mop sb-pcl:class-of + #+kmr-sbcl-mop class-name #-kmr-sbcl-mop sb-pcl:class-name + #+kmr-sbcl-mop class-slots #-kmr-sbcl-mop sb-pcl:class-slots + #+kmr-sbcl-mop find-class #-kmr-sbcl-mop sb-pcl:find-class sb-pcl::standard-class sb-pcl:slot-definition-name sb-pcl::finalize-inheritance sb-pcl::standard-direct-slot-definition -- 2.34.1 From 865f2486d2bb5ff217f640e0475b8646b9480bbe Mon Sep 17 00:00:00 2001 From: "Kevin M. Rosenberg" Date: Tue, 29 Apr 2003 06:40:03 +0000 Subject: [PATCH 13/16] r4686: Auto commit for Debian build --- attrib-class.lisp | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/attrib-class.lisp b/attrib-class.lisp index 320354a..b5b8961 100644 --- a/attrib-class.lisp +++ b/attrib-class.lisp @@ -7,7 +7,7 @@ ;;;; Programmer: Kevin M. Rosenberg ;;;; Date Started: Apr 2000 ;;;; -;;;; $Id: attrib-class.lisp,v 1.10 2003/04/29 05:14:11 kevin Exp $ +;;;; $Id: attrib-class.lisp,v 1.11 2003/04/29 06:40:03 kevin Exp $ ;;;; ;;;; This file, part of KMRCL, is Copyright (c) 2002 by Kevin M. Rosenberg ;;;; @@ -45,6 +45,7 @@ on example from AMOP")) (declare (ignore initargs)) (kmr-mop:find-class 'attributes-dsd)) +#+ignore (defmethod kmr-mop:compute-effective-slot-definition :around ((cl attributes-class) #+kmr-normal-cesd name dsds) #+kmr-normal-cesd (declare (ignore name)) @@ -54,15 +55,16 @@ on example from AMOP")) (kmr-mop::compute-effective-slot-definition-initargs cl dsds)) ) -#+ignore (defmethod kmr-mop:compute-effective-slot-definition :around ((cl attributes-class) #+kmr-named-cesd name dsds) #+kmr-named-cesd (declare (ignore name)) - (let ((normal-slot (call-next-method))) - (setf (esd-attributes normal-slot) - (remove-duplicates - (mapappend #'esd-attributes dsds))) - normal-slot)) + (let ((esd (call-next-method))) + (print esd) + (print (remove-duplicates + (mapappend #'dsd-attributes dsds))) + (setf (esd-attributes esd) + (remove-duplicates (mapappend #'dsd-attributes dsds))) + esd)) (defmethod kmr-mop:compute-slots ((class attributes-class)) -- 2.34.1 From 23dc098eb50376f955b164df32cea3927ec7f945 Mon Sep 17 00:00:00 2001 From: "Kevin M. Rosenberg" Date: Tue, 29 Apr 2003 07:52:38 +0000 Subject: [PATCH 14/16] r4687: Automatic commit for debian_version_1_32-1 --- attrib-class.lisp | 50 ++++++++++++++++++-------------- mop.lisp | 74 ++++++++++++++++++++++++++++------------------- 2 files changed, 73 insertions(+), 51 deletions(-) diff --git a/attrib-class.lisp b/attrib-class.lisp index b5b8961..ee0228b 100644 --- a/attrib-class.lisp +++ b/attrib-class.lisp @@ -7,7 +7,7 @@ ;;;; Programmer: Kevin M. Rosenberg ;;;; Date Started: Apr 2000 ;;;; -;;;; $Id: attrib-class.lisp,v 1.11 2003/04/29 06:40:03 kevin Exp $ +;;;; $Id: attrib-class.lisp,v 1.12 2003/04/29 07:52:38 kevin Exp $ ;;;; ;;;; This file, part of KMRCL, is Copyright (c) 2002 by Kevin M. Rosenberg ;;;; @@ -21,6 +21,11 @@ (in-package :kmrcl) +(defclass attributes-class (kmr-mop:standard-class) + () + (:documentation "metaclass that implements attributes on slots. Based +on example from AMOP")) + (defclass attributes-dsd (kmr-mop:standard-direct-slot-definition) ((attributes :initarg :attributes :initform nil :accessor dsd-attributes))) @@ -29,12 +34,8 @@ ((attributes :initarg :attributes :initform nil :accessor esd-attributes))) - -(defclass attributes-class (kmr-mop:standard-class) - () - (:documentation "metaclass that implements attributes on slots. Based -on example from AMOP")) - +;; encapsulating macro for Lispworks +(kmr-mop:process-slot-option attributes-class :attributes) #+(or cmu scl sbcl) (defmethod kmr-mop:validate-superclass ((class attributes-class) @@ -45,25 +46,28 @@ on example from AMOP")) (declare (ignore initargs)) (kmr-mop:find-class 'attributes-dsd)) -#+ignore +(defmethod kmr-mop:effective-slot-definition-class ((cl attributes-class) #+kmr-normal-dsdc &rest initargs) + (declare (ignore initargs)) + (kmr-mop:find-class 'attributes-esd)) + (defmethod kmr-mop:compute-effective-slot-definition :around ((cl attributes-class) #+kmr-normal-cesd name dsds) - #+kmr-normal-cesd (declare (ignore name)) + #+(and kmr-normal-cesd (not lispworks)) (declare (ignore name)) (apply #'make-instance 'attributes-esd :attributes (remove-duplicates (mapappend #'dsd-attributes dsds)) - (kmr-mop::compute-effective-slot-definition-initargs cl dsds)) + (kmr-mop::compute-effective-slot-definition-initargs cl #+lispworks name dsds)) ) +#+ignore (defmethod kmr-mop:compute-effective-slot-definition :around - ((cl attributes-class) #+kmr-named-cesd name dsds) - #+kmr-named-cesd (declare (ignore name)) + ((cl attributes-class) #+kmr-normal-cesd name dsds) + #+kmr-normal-cesd (declare (ignore name)) (let ((esd (call-next-method))) + (setq esd (change-class esd 'attributes-esd)) (print esd) - (print (remove-duplicates - (mapappend #'dsd-attributes dsds))) - (setf (esd-attributes esd) - (remove-duplicates (mapappend #'dsd-attributes dsds))) + (print (remove-duplicates (mapappend #'dsd-attributes dsds))) + (setf (esd-attributes esd) (remove-duplicates (mapappend #'dsd-attributes dsds))) esd)) @@ -77,12 +81,14 @@ on example from AMOP")) (when attr-list (cons (kmr-mop:slot-definition-name slot) attr-list)))) normal-slots))) - (setq alist (delete nil alist)) - (cons (make-instance 'kmr-mop:standard-effective-slot-definition - :name 'all-attributes - :initform `',alist - :initfunction #'(lambda () alist)) - normal-slots))) + (format t "normal-slots: ~A~%" normal-slots) + (format t "alist: ~A~%" alist) + (let ((attrib-slot (make-instance 'attributes-esd + :name 'all-attributes + :initform `',alist + :initfunction #'(lambda () alist)))) + (format t "attrib-slot: ~A~%" attrib-slot) + (cons attrib-slot normal-slots)))) (defun slot-attribute (instance slot-name attribute) (cdr (slot-attribute-bucket instance slot-name attribute))) diff --git a/mop.lisp b/mop.lisp index cad16f3..79ac647 100644 --- a/mop.lisp +++ b/mop.lisp @@ -7,7 +7,7 @@ ;;;; Programmer: Kevin M. Rosenberg ;;;; Date Started: Apr 2003 ;;;; -;;;; $Id: mop.lisp,v 1.9 2003/04/29 05:57:24 kevin Exp $ +;;;; $Id: mop.lisp,v 1.10 2003/04/29 07:52:38 kevin Exp $ ;;;; ;;;; This file, part of KMRCL, is Copyright (c) 2002 by Kevin M. Rosenberg ;;;; @@ -45,33 +45,41 @@ (in-package #:kmr-mop) +#+lispworks +(defun intern-eql-specializer (slot) + `(eql ,slot)) + + (defmacro process-class-option (metaclass slot-name &optional required) + #+lispworks + `(defmethod clos:process-a-class-option ((class ,metaclass) + (name (eql ,slot-name)) + value) + (when (and ,required (null value)) + (error "metaclass ~A class slot ~A must have a value" (quote ,metaclass) name)) + (list name `',value)) + #+(or allegro sbcl cmu scl) + (declare (ignore slot-name required)) + ) + + (defmacro process-slot-option (metaclass slot-name) + #+lispworks + `(defmethod clos:process-a-slot-option ((class ,metaclass) + (option (eql ,slot-name)) + value + already-processed-options + slot) + (list* option `',value already-processed-options)) + #-lispworks + (declare (ignore slot-name)) + ) + + (eval-when (:compile-toplevel :load-toplevel :execute) (shadowing-import #+allegro - '(class-of class-name class-slots find-class mop::standard-class - mop::slot-definition-name mop:finalize-inheritance - mop::standard-direct-slot-definition mop::standard-effective-slot-definition - mop::validate-superclass mop:direct-slot-definition-class - mop:compute-effective-slot-definition - excl::compute-effective-slot-definition-initargs - mop::slot-value-using-class - mop:class-prototype mop:generic-function-method-class mop:intern-eql-specializer - mop:make-method-lambda mop:generic-function-lambda-list - mop::compute-slots - ;; note: make-method-lambda is not fbound - ) + '(excl::compute-effective-slot-definition-initargs) #+lispworks - '(class-of class-name class-slots find-class - clos::standard-class - clos:slot-definition-name clos::finalize-inheritance - clos::standard-direct-slot-definition - clos::standard-effective-slot-definition clos::validate-superclass - clos::direct-slot-definition-class clos::compute-effective-slot-definition - clos::compute-effective-slot-definition-initargs - clos::slot-value-using-class - clos:class-prototype clos:generic-function-method-class clos:intern-eql-specializer - clos:make-method-lambda clos:generic-function-lambda-list - clos::compute-slots) + '(clos::compute-effective-slot-definition-initargs) #+sbcl '(#+kmr-sbcl-mop class-of #-kmr-sbcl-mop sb-pcl:class-of #+kmr-sbcl-mop class-name #-kmr-sbcl-mop sb-pcl:class-name @@ -81,7 +89,9 @@ sb-pcl:slot-definition-name sb-pcl::finalize-inheritance sb-pcl::standard-direct-slot-definition sb-pcl::standard-effective-slot-definition sb-pcl::validate-superclass - sb-pcl::direct-slot-definition-class sb-pcl::compute-effective-slot-definition + sb-pcl::direct-slot-definition-class + sb-pcl::effective-slot-definition-class + sb-pcl::compute-effective-slot-definition sb-pcl::compute-effective-slot-definition-initargs sb-pcl::slot-value-using-class sb-pcl:class-prototype sb-pcl:generic-function-method-class sb-pcl:intern-eql-specializer @@ -91,7 +101,7 @@ '(pcl:class-of pcl:class-name pcl:class-slots pcl:find-class pcl::standard-class pcl::slot-definition-name pcl:finalize-inheritance pcl::standard-direct-slot-definition pcl::standard-effective-slot-definition - pcl::validate-superclass pcl:direct-slot-definition-class + pcl::validate-superclass pcl:direct-slot-definition-class pcl::effective-slot-definition-class pcl:compute-effective-slot-definition pcl::compute-effective-slot-definition-initargs pcl::slot-value-using-class @@ -102,6 +112,7 @@ '(class-of class-name class-slots find-class clos::standard-class clos::slot-definition-name clos:finalize-inheritance clos::standard-direct-slot-definition clos::standard-effective-slot-definition + clos::effective-slot-definition-class clos::validate-superclass clos:direct-slot-definition-class clos:compute-effective-slot-definition clos::compute-effective-slot-definition-initargs @@ -110,19 +121,24 @@ clos:make-method-lambda clos:generic-function-lambda-list clos::compute-slots ;; note: make-method-lambda is not fbound - )) + ))) +(eval-when (:compile-toplevel :load-toplevel :execute) (export '(class-of class-name class-slots find-class standard-class slot-definition-name finalize-inheritance standard-direct-slot-definition standard-effective-slot-definition validate-superclass - direct-slot-definition-class compute-effective-slot-definition compute-effective-slot-definition-initargs + direct-slot-definition-class effective-slot-definition-class + compute-effective-slot-definition slot-value-using-class class-prototype generic-function-method-class intern-eql-specializer make-method-lambda generic-function-lambda-list - compute-slots)) + compute-slots + ;; KMR-MOP encapsulating macros + process-slot-option + process-class-option)) #+sbcl (if (find-package 'sb-mop) -- 2.34.1 From d4cc19d53788d5180eeef28b1c63edad0f201d5f Mon Sep 17 00:00:00 2001 From: "Kevin M. Rosenberg" Date: Tue, 29 Apr 2003 09:24:27 +0000 Subject: [PATCH 15/16] r4688: Auto commit for Debian build --- attrib-class.lisp | 52 ++++++++++++++++++++--------------------------- mop.lisp | 6 +++++- 2 files changed, 27 insertions(+), 31 deletions(-) diff --git a/attrib-class.lisp b/attrib-class.lisp index ee0228b..505a8a4 100644 --- a/attrib-class.lisp +++ b/attrib-class.lisp @@ -7,7 +7,7 @@ ;;;; Programmer: Kevin M. Rosenberg ;;;; Date Started: Apr 2000 ;;;; -;;;; $Id: attrib-class.lisp,v 1.12 2003/04/29 07:52:38 kevin Exp $ +;;;; $Id: attrib-class.lisp,v 1.13 2003/04/29 09:23:56 kevin Exp $ ;;;; ;;;; This file, part of KMRCL, is Copyright (c) 2002 by Kevin M. Rosenberg ;;;; @@ -50,45 +50,37 @@ on example from AMOP")) (declare (ignore initargs)) (kmr-mop:find-class 'attributes-esd)) -(defmethod kmr-mop:compute-effective-slot-definition :around - ((cl attributes-class) #+kmr-normal-cesd name dsds) - #+(and kmr-normal-cesd (not lispworks)) (declare (ignore name)) - (apply - #'make-instance 'attributes-esd - :attributes (remove-duplicates (mapappend #'dsd-attributes dsds)) - (kmr-mop::compute-effective-slot-definition-initargs cl #+lispworks name dsds)) - ) - -#+ignore (defmethod kmr-mop:compute-effective-slot-definition :around ((cl attributes-class) #+kmr-normal-cesd name dsds) #+kmr-normal-cesd (declare (ignore name)) (let ((esd (call-next-method))) - (setq esd (change-class esd 'attributes-esd)) - (print esd) - (print (remove-duplicates (mapappend #'dsd-attributes dsds))) (setf (esd-attributes esd) (remove-duplicates (mapappend #'dsd-attributes dsds))) esd)) - (defmethod kmr-mop:compute-slots ((class attributes-class)) (let* ((normal-slots (call-next-method)) - (alist - (mapcar - #'(lambda (slot) - (let ((attr-list (mapcar #'(lambda (attr) (cons attr nil)) - (esd-attributes slot)))) - (when attr-list - (cons (kmr-mop:slot-definition-name slot) attr-list)))) - normal-slots))) - (format t "normal-slots: ~A~%" normal-slots) - (format t "alist: ~A~%" alist) + (alist (delete + nil + (mapcar + #'(lambda (slot) + (let ((attr-list (mapcar #'(lambda (attr) (list attr)) + (esd-attributes slot)))) + (when attr-list + (cons (kmr-mop:slot-definition-name slot) attr-list)))) + normal-slots)))) (let ((attrib-slot (make-instance 'attributes-esd - :name 'all-attributes - :initform `',alist - :initfunction #'(lambda () alist)))) - (format t "attrib-slot: ~A~%" attrib-slot) - (cons attrib-slot normal-slots)))) + :name 'all-attributes + :initform `',alist + :initfunction #'(lambda () alist) + :allocation :instance + :class class + :documentation "" + :type t + ;; This is an attempted work-around -- lispworks doesn't work + ;; it appears to setup storage someplace + #+lispworks :location #+lispworks (length normal-slots) + ))) + (append normal-slots (list attrib-slot))))) (defun slot-attribute (instance slot-name attribute) (cdr (slot-attribute-bucket instance slot-name attribute))) diff --git a/mop.lisp b/mop.lisp index 79ac647..3252d61 100644 --- a/mop.lisp +++ b/mop.lisp @@ -7,7 +7,7 @@ ;;;; Programmer: Kevin M. Rosenberg ;;;; Date Started: Apr 2003 ;;;; -;;;; $Id: mop.lisp,v 1.10 2003/04/29 07:52:38 kevin Exp $ +;;;; $Id: mop.lisp,v 1.11 2003/04/29 09:23:56 kevin Exp $ ;;;; ;;;; This file, part of KMRCL, is Copyright (c) 2002 by Kevin M. Rosenberg ;;;; @@ -92,6 +92,7 @@ sb-pcl::direct-slot-definition-class sb-pcl::effective-slot-definition-class sb-pcl::compute-effective-slot-definition + sb-pcl:class-direct-slots sb-pcl::compute-effective-slot-definition-initargs sb-pcl::slot-value-using-class sb-pcl:class-prototype sb-pcl:generic-function-method-class sb-pcl:intern-eql-specializer @@ -103,6 +104,7 @@ pcl::standard-direct-slot-definition pcl::standard-effective-slot-definition pcl::validate-superclass pcl:direct-slot-definition-class pcl::effective-slot-definition-class pcl:compute-effective-slot-definition + pcl:class-direct-slots pcl::compute-effective-slot-definition-initargs pcl::slot-value-using-class pcl:class-prototype pcl:generic-function-method-class pcl:intern-eql-specializer @@ -113,6 +115,7 @@ clos::slot-definition-name clos:finalize-inheritance clos::standard-direct-slot-definition clos::standard-effective-slot-definition clos::effective-slot-definition-class + clos:class-direct-slots clos::validate-superclass clos:direct-slot-definition-class clos:compute-effective-slot-definition clos::compute-effective-slot-definition-initargs @@ -136,6 +139,7 @@ class-prototype generic-function-method-class intern-eql-specializer make-method-lambda generic-function-lambda-list compute-slots + class-direct-slots ;; KMR-MOP encapsulating macros process-slot-option process-class-option)) -- 2.34.1 From a3ddf56dae1326e736facc5d8034b457bbad1200 Mon Sep 17 00:00:00 2001 From: "Kevin M. Rosenberg" Date: Tue, 29 Apr 2003 10:33:32 +0000 Subject: [PATCH 16/16] r4696: Auto commit for Debian build --- mop.lisp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mop.lisp b/mop.lisp index 3252d61..c62a250 100644 --- a/mop.lisp +++ b/mop.lisp @@ -7,7 +7,7 @@ ;;;; Programmer: Kevin M. Rosenberg ;;;; Date Started: Apr 2003 ;;;; -;;;; $Id: mop.lisp,v 1.11 2003/04/29 09:23:56 kevin Exp $ +;;;; $Id: mop.lisp,v 1.12 2003/04/29 10:33:32 kevin Exp $ ;;;; ;;;; This file, part of KMRCL, is Copyright (c) 2002 by Kevin M. Rosenberg ;;;; @@ -58,7 +58,7 @@ (error "metaclass ~A class slot ~A must have a value" (quote ,metaclass) name)) (list name `',value)) #+(or allegro sbcl cmu scl) - (declare (ignore slot-name required)) + (declare (ignore metaclass slot-name required)) ) (defmacro process-slot-option (metaclass slot-name) @@ -70,7 +70,7 @@ slot) (list* option `',value already-processed-options)) #-lispworks - (declare (ignore slot-name)) + (declare (ignore metaclass slot-name)) ) -- 2.34.1