/[cmucl]/src/pcl/pkg.lisp
ViewVC logotype

Contents of /src/pcl/pkg.lisp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.14 - (hide annotations)
Fri Jun 5 02:53:53 1998 UTC (15 years, 10 months ago) by dtc
Branch: MAIN
Changes since 1.13: +2 -1 lines
Rework the PCL class hierarchy to better match the disjoint instance
and funcallable-instance types within CMUCL. Add the new class
funcallable-standard-object, and the new class std-object as a
superclass of both standard-object and
funcallable-standard-object. Generic-functions are now
funcallable-standard-objects implemented as FINs and disjoint from
standard-objects which are implemented as instances in CMUCL, fixing
some problems in the type system.

This change moves the PCL implementation away from the MOP
specification which requires that generic-functions be
standard-objects. However ANSI CL does not require generic functions
to be standard-objects and the MOP author Gregor Kiczales suggests it
is appropriate for generic functions to be disjoint from
standard-objects.
1 wlott 1.1 ;;;-*-Mode:LISP; Package:(PCL (LISP WALKER)); Base:10; Syntax:Common-lisp -*-
2     ;;;
3     ;;; *************************************************************************
4     ;;; Copyright (c) 1985, 1986, 1987, 1988, 1989, 1990 Xerox Corporation.
5     ;;; All rights reserved.
6     ;;;
7     ;;; Use and copying of this software and preparation of derivative works
8     ;;; based upon this software are permitted. Any distribution of this
9     ;;; software or derivative works must comply with all applicable United
10     ;;; States export control laws.
11     ;;;
12     ;;; This software is made available AS IS, and Xerox Corporation makes no
13     ;;; warranty about the software, its performance or its conformity to any
14     ;;; specification.
15     ;;;
16     ;;; Any person obtaining a copy of this software is requested to send their
17     ;;; name and post office or electronic mail address to:
18     ;;; CommonLoops Coordinator
19     ;;; Xerox PARC
20     ;;; 3333 Coyote Hill Rd.
21     ;;; Palo Alto, CA 94304
22     ;;; (or send Arpanet mail to CommonLoops-Coordinator.pa@Xerox.arpa)
23     ;;;
24     ;;; Suggestions, comments and requests for improvements are also welcome.
25     ;;; *************************************************************************
26     ;;;
27    
28 pw 1.11 ;;; CMUCL 18a: Jan-1998 -- Changing to DEFPACKAGE.
29     ;;; Note that at this time CMUCL is not in compliance with ANSI
30     ;;; specified use of feature names :cltl2 :x3j13 :draft-ansi-cl or :ansi-cl
31     ;;; since all of them are in *features*. So I'm not going to try and be
32     ;;; clever with hacking around all the various ancient lisp quirks.
33     ;;; This file is now CMUCL specific only.
34    
35     (defpackage "WALKER" (:use :common-lisp)
36     (:export "DEFINE-WALKER-TEMPLATE"
37     "WALK-FORM"
38     "WALK-FORM-EXPAND-MACROS-P"
39     "NESTED-WALK-FORM"
40     "VARIABLE-LEXICAL-P"
41     "VARIABLE-SPECIAL-P"
42     "VARIABLE-GLOBALLY-SPECIAL-P"
43     "*VARIABLE-DECLARATIONS*"
44     "VARIABLE-DECLARATION"
45     "MACROEXPAND-ALL"))
46    
47     (defpackage "ITERATE" (:use :common-lisp :walker)
48     (:export "ITERATE" "ITERATE*" "GATHERING" "GATHER" "WITH-GATHERING"
49     "INTERVAL" "ELEMENTS" "LIST-ELEMENTS" "LIST-TAILS"
50     "PLIST-ELEMENTS" "EACHTIME" "WHILE" "UNTIL"
51     "COLLECTING" "JOINING" "MAXIMIZING" "MINIMIZING" "SUMMING"
52     "*ITERATE-WARNINGS*"))
53    
54     (defpackage "PCL" (:use :common-lisp :walker :iterate)
55     #+CMU
56     (:shadow "DESTRUCTURING-BIND")
57     #+cmu17
58     (:shadow "FIND-CLASS" "CLASS-NAME" "CLASS-OF"
59     "CLASS" "BUILT-IN-CLASS" "STRUCTURE-CLASS"
60     "STANDARD-CLASS")
61 wlott 1.1
62 pw 1.11 #+cmu
63     (:shadow "DOTIMES")
64 ram 1.7
65 pw 1.11 #+cmu
66     (:import-from :kernel "FUNCALLABLE-INSTANCE-P")
67 ram 1.7
68 pw 1.11 (:shadow "DOCUMENTATION")
69 wlott 1.1
70    
71     ;;;
72     ;;; These come from the index pages of 88-002R.
73     ;;;
74     ;;;
75    
76 pw 1.11 (:export "ADD-METHOD"
77     "BUILT-IN-CLASS"
78     "CALL-METHOD"
79     "CALL-NEXT-METHOD"
80     "CHANGE-CLASS"
81     "CLASS-NAME"
82     "CLASS-OF"
83     "COMPUTE-APPLICABLE-METHODS"
84     "DEFCLASS"
85     "DEFGENERIC"
86     "DEFINE-METHOD-COMBINATION"
87     "DEFMETHOD"
88 dtc 1.13 "DESCRIBE-OBJECT"
89 pw 1.11 "ENSURE-GENERIC-FUNCTION"
90     "FIND-CLASS"
91     "FIND-METHOD"
92     "FUNCTION-KEYWORDS"
93     "GENERIC-FLET"
94     "GENERIC-LABELS"
95     "INITIALIZE-INSTANCE"
96     "INVALID-METHOD-ERROR"
97     "MAKE-INSTANCE"
98     "MAKE-INSTANCES-OBSOLETE"
99     "METHOD-COMBINATION-ERROR"
100     "METHOD-QUALIFIERS"
101     "NEXT-METHOD-P"
102     "NO-APPLICABLE-METHOD"
103     "NO-NEXT-METHOD"
104     "PRINT-OBJECT"
105     "REINITIALIZE-INSTANCE"
106     "REMOVE-METHOD"
107     "SHARED-INITIALIZE"
108     "SLOT-BOUNDP"
109     "SLOT-EXISTS-P"
110     "SLOT-MAKUNBOUND"
111     "SLOT-MISSING"
112     "SLOT-UNBOUND"
113     "SLOT-VALUE"
114     "STANDARD"
115     #-CMU17 "STANDARD-CLASS"
116     "STANDARD-GENERIC-FUNCTION"
117     "STANDARD-METHOD"
118     "STANDARD-OBJECT"
119     #-CMU17 "STRUCTURE-CLASS"
120     #-CMU17 "SYMBOL-MACROLET"
121     "UPDATE-INSTANCE-FOR-DIFFERENT-CLASS"
122     "UPDATE-INSTANCE-FOR-REDEFINED-CLASS"
123     "WITH-ACCESSORS"
124     "WITH-ADDED-METHODS"
125     "WITH-SLOTS"
126     )
127 ram 1.8
128 pw 1.11 (:export "STANDARD-INSTANCE"
129     "FUNCALLABLE-STANDARD-INSTANCE"
130     "GENERIC-FUNCTION"
131     "STANDARD-GENERIC-FUNCTION"
132     "METHOD"
133     "STANDARD-METHOD"
134     "STANDARD-ACCESSOR-METHOD"
135     "STANDARD-READER-METHOD"
136     "STANDARD-WRITER-METHOD"
137     "METHOD-COMBINATION"
138     "SLOT-DEFINITION"
139     "DIRECT-SLOT-DEFINITION"
140     "EFFECTIVE-SLOT-DEFINITION"
141     "STANDARD-SLOT-DEFINITION"
142     "STANDARD-DIRECT-SLOT-DEFINITION"
143     "STANDARD-EFFECTIVE-SLOT-DEFINITION"
144     "SPECIALIZER"
145     "EQL-SPECIALIZER"
146     #-CMU17 "BUILT-IN-CLASS"
147     "FORWARD-REFERENCED-CLASS"
148     #-CMU17 "STANDARD-CLASS"
149 dtc 1.14 "FUNCALLABLE-STANDARD-CLASS"
150     "FUNCALLABLE-STANDARD-OBJECT")
151 pw 1.11
152     ;;*chapter-6-exports*
153     (:export "ADD-DEPENDENT"
154     "ADD-DIRECT-METHOD"
155     "ADD-DIRECT-SUBCLASS"
156     "ADD-METHOD"
157     "ALLOCATE-INSTANCE"
158     "CLASS-DEFAULT-INITARGS"
159     "CLASS-DIRECT-DEFAULT-INITARGS"
160     "CLASS-DIRECT-SLOTS"
161     "CLASS-DIRECT-SUBCLASSES"
162     "CLASS-DIRECT-SUPERCLASSES"
163     "CLASS-FINALIZED-P"
164     "CLASS-PRECEDENCE-LIST"
165     "CLASS-PROTOTYPE"
166     "CLASS-SLOTS"
167     "COMPUTE-APPLICABLE-METHODS"
168     "COMPUTE-APPLICABLE-METHODS-USING-CLASSES"
169     "COMPUTE-CLASS-PRECEDENCE-LIST"
170     "COMPUTE-DISCRIMINATING-FUNCTION"
171     "COMPUTE-EFFECTIVE-METHOD"
172     "COMPUTE-EFFECTIVE-SLOT-DEFINITION"
173     "COMPUTE-SLOTS"
174     "DIRECT-SLOT-DEFINITION-CLASS"
175     "EFFECTIVE-SLOT-DEFINITION-CLASS"
176     "ENSURE-CLASS"
177     "ENSURE-CLASS-USING-CLASS"
178     "ENSURE-GENERIC-FUNCTION"
179     "ENSURE-GENERIC-FUNCTION-USING-CLASS"
180     "EQL-SPECIALIZER-INSTANCE"
181     "EXTRACT-LAMBDA-LIST"
182     "EXTRACT-SPECIALIZER-NAMES"
183     "FINALIZE-INHERITANCE"
184     "FIND-METHOD-COMBINATION"
185     "FUNCALLABLE-STANDARD-INSTANCE-ACCESS"
186     "GENERIC-FUNCTION-ARGUMENT-PRECEDENCE-ORDER"
187     "GENERIC-FUNCTION-DECLARATIONS"
188     "GENERIC-FUNCTION-LAMBDA-LIST"
189     "GENERIC-FUNCTION-METHOD-CLASS"
190     "GENERIC-FUNCTION-METHOD-COMBINATION"
191     "GENERIC-FUNCTION-METHODS"
192     "GENERIC-FUNCTION-NAME"
193     "INTERN-EQL-SPECIALIZER"
194     "MAKE-INSTANCE"
195     "MAKE-METHOD-LAMBDA"
196     "MAP-DEPENDENTS"
197     "METHOD-FUNCTION"
198     "METHOD-GENERIC-FUNCTION"
199     "METHOD-LAMBDA-LIST"
200     "METHOD-SPECIALIZERS"
201     "METHOD-QUALIFIERS"
202     "ACCESSOR-METHOD-SLOT-DEFINITION"
203     "READER-METHOD-CLASS"
204     "REMOVE-DEPENDENT"
205     "REMOVE-DIRECT-METHOD"
206     "REMOVE-DIRECT-SUBCLASS"
207     "REMOVE-METHOD"
208     "SET-FUNCALLABLE-INSTANCE-FUNCTION"
209     "SLOT-BOUNDP-USING-CLASS"
210     "SLOT-DEFINITION-ALLOCATION"
211     "SLOT-DEFINITION-INITARGS"
212     "SLOT-DEFINITION-INITFORM"
213     "SLOT-DEFINITION-INITFUNCTION"
214     "SLOT-DEFINITION-LOCATION"
215     "SLOT-DEFINITION-NAME"
216     "SLOT-DEFINITION-READERS"
217     "SLOT-DEFINITION-WRITERS"
218     "SLOT-DEFINITION-TYPE"
219     "SLOT-MAKUNBOUND-USING-CLASS"
220     "SLOT-VALUE-USING-CLASS"
221     "SPECIALIZER-DIRECT-GENERIC-FUNCTION"
222     "SPECIALIZER-DIRECT-METHODS"
223     "STANDARD-INSTANCE-ACCESS"
224     "UPDATE-DEPENDENT"
225     "VALIDATE-SUPERCLASS"
226     "WRITER-METHOD-CLASS"
227 ram 1.8 ))
228 ram 1.3
229 pw 1.11 (defpackage "SLOT-ACCESSOR-NAME" (:use)(:nicknames "S-A-N"))
230 ram 1.8
231 pw 1.11 (in-package :pcl)
232     (defvar *slot-accessor-name-package*
233     (find-package :slot-accessor-name))
234    
235     ;;; These symbol names came from "The Art of the Metaobject Protocol".
236     ;;;
237 ram 1.8
238 pw 1.11 (defpackage "CLOS-MOP"
239     (:use :pcl :common-lisp)
240     (:nicknames "MOP")
241    
242     (:shadowing-import-from :pcl
243     "FIND-CLASS" "CLASS-NAME" "BUILT-IN-CLASS" "CLASS-OF")
244 pw 1.12 (:export
245     "FIND-CLASS" "CLASS-NAME" "BUILT-IN-CLASS" "CLASS-OF")
246 pw 1.11
247     (:export ;; Names taken from "The Art of the Metaobject Protocol"
248     "ADD-DEPENDENT"
249     "ADD-DIRECT-METHOD"
250     "ADD-DIRECT-SUBCLASS"
251     "ADD-METHOD"
252     "ALLOCATE-INSTANCE"
253     "CLASS-DEFAULT-INITARGS"
254     "CLASS-DIRECT-DEFAULT-INITARGS"
255     "CLASS-DIRECT-SLOTS"
256     "CLASS-DIRECT-SUBCLASSES"
257     "CLASS-DIRECT-SUPERCLASSES"
258     "CLASS-FINALIZED-P"
259     "CLASS-NAME"
260     "CLASS-PRECEDENCE-LIST"
261     "CLASS-PROTOTYPE"
262     "CLASS-SLOTS"
263     "COMPUTE-APPLICABLE-METHODS"
264     "COMPUTE-APPLICABLE-METHODS-USING-CLASSES"
265     "COMPUTE-CLASS-PRECEDENCE-LIST"
266     "COMPUTE-DEFAULT-INITARGS"
267     "COMPUTE-DISCRIMINATING-FUNCTION"
268     "COMPUTE-EFFECTIVE-METHOD"
269     "COMPUTE-EFFECTIVE-SLOT-DEFINITION"
270     "COMPUTE-SLOTS"
271     "DIRECT-SLOT-DEFINITION-CLASS"
272     "EFFECTIVE-SLOT-DEFINITION-CLASS"
273     "ENSURE-CLASS"
274     "ENSURE-CLASS-USING-CLASS"
275     "ENSURE-GENERIC-FUNCTION"
276     "ENSURE-GENERIC-FUNCTION-USING-CLASS"
277     "EQL-SPECIALIZER-OBJECT"
278     "EXTRACT-LAMBDA-LIST"
279     "EXTRACT-SPECIALIZER-NAMES"
280     "FINALIZE-INHERITANCE"
281     "FIND-METHOD-COMBINATION"
282     "FUNCALLABLE-STANDARD-INSTANCE-ACCESS"
283     "GENERIC-FUNCTION-ARGUMENT-PRECEDENCE-ORDER"
284     "GENERIC-FUNCTION-DECLARATIONS"
285     "GENERIC-FUNCTION-LAMBDA-LIST"
286     "GENERIC-FUNCTION-METHOD-CLASS"
287     "GENERIC-FUNCTION-METHOD-COMBINATION"
288     "GENERIC-FUNCTION-METHODS"
289     "GENERIC-FUNCTION-NAME"
290     "INTERN-EQL-SPECIALIZER"
291     "MAKE-INSTANCE"
292     "MAKE-METHOD-LAMBDA"
293     "MAP-DEPENDENTS"
294     "METHOD-FUNCTION"
295     "METHOD-GENERIC-FUNCTION"
296     "METHOD-LAMBDA-LIST"
297     "METHOD-SPECIALIZERS"
298     "METHOD-QUALIFIERS"
299     "ACCESSOR-METHOD-SLOT-DEFINITION"
300    
301     "SLOT-DEFINITION-ALLOCATION"
302     "SLOT-DEFINITION-INITARGS"
303     "SLOT-DEFINITION-INITFORM"
304     "SLOT-DEFINITION-INITFUNCTION"
305     "SLOT-DEFINITION-NAME"
306     "SLOT-DEFINITION-TYPE"
307     "SLOT-DEFINITION-READERS"
308     "SLOT-DEFINITION-WRITERS"
309     "SLOT-DEFINITION-LOCATION"
310    
311     "READER-METHOD-CLASS"
312     "REMOVE-DEPENDENT"
313     "REMOVE-DIRECT-METHOD"
314     "REMOVE-DIRECT-SUBCLASS"
315     "REMOVE-METHOD"
316     "SET-FUNCALLABLE-INSTANCE-FUNCTION"
317     "SLOT-BOUNDP-USING-CLASS"
318     "SLOT-MAKUNBOUND-USING-CLASS"
319     "SLOT-VALUE-USING-CLASS"
320     "SPECIALIZER-DIRECT-GENERIC-FUNCTIONS"
321     "SPECIALIZER-DIRECT-METHODS"
322     "STANDARD-INSTANCE-ACCESS"
323     "UPDATE-DEPENDENT"
324     "VALIDATE-SUPERCLASS"
325     "WRITER-METHOD-CLASS"
326     ))

  ViewVC Help
Powered by ViewVC 1.1.5