1 ;;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10 -*-
2 ;;;; *************************************************************************
3 ;;;; FILE IDENTIFICATION
6 ;;;; Purpose: Imports standard MOP symbols into KMRCL
7 ;;;; Programmer: Kevin M. Rosenberg
8 ;;;; Date Started: Apr 2003
10 ;;;; $Id: mop.lisp,v 1.8 2003/04/29 05:54:24 kevin Exp $
12 ;;;; This file, part of KMRCL, is Copyright (c) 2002 by Kevin M. Rosenberg
14 ;;;; KMRCL users are granted the rights to distribute and use this software
15 ;;;; as governed by the terms of the Lisp Lesser GNU Public License
16 ;;;; (http://opensource.franz.com/preamble.html), also known as the LLGPL.
17 ;;;; *************************************************************************
19 ;;; This file imports MOP symbols into KMR-MOP packages and then
20 ;;; re-exports them to hide differences in MOP implementations.
22 (in-package #:cl-user)
25 (eval-when (:compile-toplevel :load-toplevel :execute)
26 (if (find-package 'sb-mop)
27 (pushnew :kmr-sbcl-mop cl:*features*)
28 (pushnew :kmr-sbcl-pcl cl:*features*)))
31 (eval-when (:compile-toplevel :load-toplevel :execute)
32 (if (find-package 'mop)
33 (pushnew :kmr-cmucl-mop cl:*features*)
34 (pushnew :kmr-cmucl-pcl cl:*features*)))
40 #+kmr-sbcl-mop #:sb-mop
46 (in-package #:kmr-mop)
48 (eval-when (:compile-toplevel :load-toplevel :execute)
51 '(class-of class-name class-slots find-class mop::standard-class
52 mop::slot-definition-name mop:finalize-inheritance
53 mop::standard-direct-slot-definition mop::standard-effective-slot-definition
54 mop::validate-superclass mop:direct-slot-definition-class
55 mop:compute-effective-slot-definition
56 excl::compute-effective-slot-definition-initargs
57 mop::slot-value-using-class
58 mop:class-prototype mop:generic-function-method-class mop:intern-eql-specializer
59 mop:make-method-lambda mop:generic-function-lambda-list
61 ;; note: make-method-lambda is not fbound
64 '(class-of class-name class-slots find-class
66 clos:slot-definition-name clos::finalize-inheritance
67 clos::standard-direct-slot-definition
68 clos::standard-effective-slot-definition clos::validate-superclass
69 clos::direct-slot-definition-class clos::compute-effective-slot-definition
70 clos::compute-effective-slot-definition-initargs
71 clos::slot-value-using-class
72 clos:class-prototype clos:generic-function-method-class clos:intern-eql-specializer
73 clos:make-method-lambda clos:generic-function-lambda-list
76 '(sb-pcl:class-of sb-pcl:class-name sb-pcl:class-slots sb-pcl:find-class
77 sb-pcl::standard-class
78 sb-pcl:slot-definition-name sb-pcl::finalize-inheritance
79 sb-pcl::standard-direct-slot-definition
80 sb-pcl::standard-effective-slot-definition sb-pcl::validate-superclass
81 sb-pcl::direct-slot-definition-class sb-pcl::compute-effective-slot-definition
82 sb-pcl::compute-effective-slot-definition-initargs
83 sb-pcl::slot-value-using-class
84 sb-pcl:class-prototype sb-pcl:generic-function-method-class sb-pcl:intern-eql-specializer
85 sb-pcl:make-method-lambda sb-pcl:generic-function-lambda-list
86 sb-pcl::compute-slots)
88 '(pcl:class-of pcl:class-name pcl:class-slots pcl:find-class pcl::standard-class
89 pcl::slot-definition-name pcl:finalize-inheritance
90 pcl::standard-direct-slot-definition pcl::standard-effective-slot-definition
91 pcl::validate-superclass pcl:direct-slot-definition-class
92 pcl:compute-effective-slot-definition
93 pcl::compute-effective-slot-definition-initargs
94 pcl::slot-value-using-class
95 pcl:class-prototype pcl:generic-function-method-class pcl:intern-eql-specializer
96 pcl:make-method-lambda pcl:generic-function-lambda-list
99 '(class-of class-name class-slots find-class clos::standard-class
100 clos::slot-definition-name clos:finalize-inheritance
101 clos::standard-direct-slot-definition clos::standard-effective-slot-definition
102 clos::validate-superclass clos:direct-slot-definition-class
103 clos:compute-effective-slot-definition
104 clos::compute-effective-slot-definition-initargs
105 clos::slot-value-using-class
106 clos:class-prototype clos:generic-function-method-class clos:intern-eql-specializer
107 clos:make-method-lambda clos:generic-function-lambda-list
109 ;; note: make-method-lambda is not fbound
112 (export '(class-of class-name class-slots find-class
114 slot-definition-name finalize-inheritance
115 standard-direct-slot-definition
116 standard-effective-slot-definition validate-superclass
117 direct-slot-definition-class compute-effective-slot-definition
118 compute-effective-slot-definition-initargs
119 slot-value-using-class
120 class-prototype generic-function-method-class intern-eql-specializer
121 make-method-lambda generic-function-lambda-list
125 (if (find-package 'sb-mop)
126 (setq cl:*features* (delete :kmr-sbcl-mop cl:*features*))
127 (setq cl:*features* (delete :kmr-sbcl-pcl cl:*features*)))
130 (if (find-package 'mop)
131 (setq cl:*features* (delete :kmr-cmucl-mop cl:*features*))
132 (setq cl:*features* (delete :kmr-cmucl-pcl cl:*features*)))
134 (when (>= (length (generic-function-lambda-list
135 (ensure-generic-function
136 'compute-effective-slot-definition)))
138 (pushnew :kmr-normal-cesd cl:*features*))
140 (when (>= (length (generic-function-lambda-list
141 (ensure-generic-function
142 'direct-slot-definition-class)))
144 (pushnew :kmr-normal-dsdc cl:*features*))