Parent Directory | Revision Log
|Links to HEAD:||(view) (annotate)|
|Links to lisp-executable-base:||(view) (annotate)|
SLOT-VALUE, (SETF SLOT-VALUE), SLOT-BOUNDP, SLOT-MAKUNBOUND not returning values specified by the standard when SLOT-MISSING/SLOT-UNBOUND are called and return. Found by Paul Dietz. * src/pcl/std-class.lisp (compute-effective-slot-definition): Return slot-unbound's primary value. * src/pcl/slots.lisp (slot-value): Return slot-missing's primary value. (set-slot-value): Always return the new value. (slot-boundp): Return a boolean equivalent of slot-missing's primary value. (slot-makunbound): Always return the instance. (slot-value-using-class): Return slot-unbound's primary value. (slot-unbound-internal): Likewise. * src/pcl/slots-boot.lisp (ensure-accessor): Return slot-missing's primary value for slot-value, a boolean equivalent of its primary value for slot-boundp, and always return the value for setf. (accessor-set-slot-value): Always return the new value. (make-optimized-std-reader-method-function): Return slot-unbound's primary value. (make-optimized-std-slot-value-using-class-method-function) (make-internal-reader-method-function): Likewise. * src/pcl/method-slot-access-optimization.lisp (inline-slot-unbound): Return slot-unbound's primary value.
Class redefinition and proper class names. Found by Paul Dietz. * src/pcl/std-class.lisp (ensure-class): Redefine a class only if the specified name is the proper name of the class.
Structure slot names can be any symbol. Found by Paul Dietz. * src/pcl/std-class.lisp (*allow-funny-slot-names*): Renamed from *allow-keyword-slot-names*. * src/pcl/methods.lisp (legal-slot-name-p): Allow any symbol if *allow-funny-slot-names* is true. (shared-initialize): Print the value of the :slot-name initarg. * src/code/defstruct.lisp (parse-1-dsd): Treat nil as symbol when used as a slot name.
CLHS 7.6.5 keyword argument checking for calls to generic functions. Found by Paul Dietz, of course. This also includes some minor code cleanup and a fix for a bug caused by a typo. * src-gf/pcl/std-class.lisp (compute-effective-slot-definition-initargs): Reformatted to make it readable on a tty. * src-gf/pcl/methods.lisp (set-condition-svuc-method): Fix a typo. * src-gf/pcl/low.lisp (parse-lambda-list): Add an ignore declaration. * src-gf/pcl/init.lisp (valid-initargs): Use method-lambda-list*. * src-gf/pcl/dfun.lisp (use-caching-dfun-p): Use generic-function-methods*. (use-constant-value-dfun-p): Ditto. (use-dispatch-dfun-p): Don't use dispatching dfuns when we must check keyword arguments according to CLHS 7.6.5, because this computes emfs for sets methods that aren't applicable together in the usual sense; this screws up emf keyword argument checking, of course. (make-initial-dfun): Use gf-arg-info*. (update-dfun): Use generic-function-name*. (final-accessor-dfun-type, make-accessor-table) (compute-applicable-methods-using-types) (compute-applicable-methods-using-types): Likewise. * src-gf/pcl/combin.lisp (standard-compute-effective-method): Don't use the single-call-method optimization if we must check keyword arguments according to CLHS 7.6.5. (callable-generator-for-emf): Rewritten to add a keyword argument check to the emf. (emfs-must-check-applicable-keywords-p) (compute-applicable-keywords, check-applicable-keywords): New functions. (odd-number-of-keyword-arguments, invalid-keyword-argument): Moved here from boot.lisp. (make-effective-method-lambda): Add a check-applicable-keywords form to the emf, if appropriate. (memf-test-converter, memf-code-converter) (memf-constant-converter): Deal with check-applicable-keywords. (*applicable-methods*): New variable. (make-callable): Bind it. (make-emf-name): Use generic-function-name*. * src/pcl/braid.lisp (ensure-non-standard-class): Remove an used branch. * src/pcl/boot.lisp (*make-method-lambda-gf-name*): Removed. (expand-defmethod): Don't bind it. (make-method-lambda-internal): Don't add &key to the method function's lambda-list if the gf has &key. (bind-args): Rewritten. Don't do keyword checking as this is done in emfs now. (get-key-arg, get-key-arg1): Simplified; do less checking. (generic-function-name*, generic-function-methods*) (gf-arg-info*, method-lambda-list*): New functions. (check-method-arg-info): Use them. (gf-lambda-list-from-method): New function. (gf-lambda-list): Use it. Don't add &allow-other-keys to a gf's lambda-list if a method has &key. (get-generic-function-info): Use gf-arg-info*. (parse-specialized-lambda-list): Add an ignore declaration. (odd-number-of-keyword-arguments, invalid-keyword-argument): Moved to combin.lisp. (check-generic-function-lambda-list): Remove &more stuff because that's checked elsewhere now (and Python can even tell it is). * src-gf/pcl/ctor.lisp (install-optimized-constructor): Remove an unmatched ).
Store user-specified slot names in DEFSTRUCT-SLOT-DESCRIPTIONs, which is necessary for conforming SLOT-EXISTS-P and MAKE-LOAD-FORM-SAVING-SLOTS. To bootstrap, using pmai's build scripts: 1. Copy boot10.lisp to target:bootstrap.lisp and do a full build. Choose the CLOBBER-IT restart when asked (for an unknown reason, it doesn't work to do this programatically.) 2. Leave the bootstrap file where it is and do a full build with the Lisp produced in step 1. 3. Remove the bootstrap file and do another full build. * src/bootfiles/18e/boot10.lisp: New file. * src-dsd/code/defstruct.lisp (defstruct-slot-description): Rename slot %name to name. (dsd-%name): New function. (dsd-name): Function removed. (parse-1-dsd): Set dsd-name to the slot symbol. * src-dsd/pcl/std-class.lisp (*allow-keyword-slot-names*): New variable. (initialize-internal-slot-functions) <around structure-effective-slot-definition>: New method binding *allow-keyword-slot-names* to true. * src-dsd/pcl/methods.lisp (legal-slot-name-p): Allow keywords if *allow-keyword-slot-names* is true.
More SLOT-VALUE etc. on conditions. * src/pcl/slots.lisp (slot-value-using-class) (setf slot-boundp-using-class) <condition-class>: New methods. * src/pcl/std-class.lisp (initialize-internal-slot-functions): Use slot-name->class-table. (shared-initialize): Call update-pv-table-cache-info. (compute-slots) <around condition-class>: New method. * src/pcl/slots-boot.lisp (ensure-accessor): Use slot-name->class-table. (get-optimized-std-accessor-method-function) (get-optimized-std-slot-value-using-class-method-function): Handle condition classes. * src/pcl/methods.lisp (*condition-slot-value-using-class-method*) (*condition-setf-slot-value-using-class-method*) (*condition-slot-boundp-using-class-method*): New vars. (condition-svuc-method, set-condition-svuc-method): New functions. (update-std-or-str-methods): Handle conditions. * src/pcl/generic-functions.lisp (condition-class-p): New gf. * src/pcl/dfun.lisp (make-accessor-table): Use slot-name->class-table. * src/pcl/defs.lisp (*the-condition-class*): New var. (slot-name->class-table): New function. (condition): New class. (*early-class-predicates*): Add condition-class-p. * src/pcl/braid.lisp (bootstrap-meta-braid) (bootstrap-initialize-class): Add condition-class stuff. (bootstrap-make-slot-definitions): Simplified. (bootstrap-make-slot-definition): Use slot-name->class-table.
Make condition slots readable with SLOT-VALUE. * src/pcl/std-class.lisp (compute-effective-slot-definition) <condition-class>: New method. * src/pcl/slots.lisp (slot-makunbound-using-class) <condition-class>: New method.
SLOT-EXISTS-P is supposed to work on conditions. Detected by Paul Dietz. * src/pcl/std-class.lisp (class-direct-slots, class-slots) <condition-class>: Remove methods. (shared-initialize) <condition-class>: Initialize direct and effective slots. (direct-slot-definition-class, effective-slot-definition-class) (finalize-inheritance, shared-initialize) <condition-class>: New methods. * src/pcl/braid.lisp (ensure-non-standard-class): Pass slot initargs to ensure-class for condition classes. * src/pcl/defs.lisp (condition-class): Inherit from slot-class. (condition-slot-definition, condition-direct-slot-definition) (condition-effective-slot-definition): New classes.
* src/pcl/std-class.lisp (update-shared-slot-values): Test if shared slot is still unbound. Thanks to Christophe Rhodes.
Code cleanup. Use EXTENSIONS package to reduce clutter. * src/pcl/defsys.lisp ("PCL", "WALKER"): Use ext. * src/pcl/pkg.lisp ("PCL", "WALKER"): Use ext. * src/pcl/*.lisp: Remove ext: prefixes. * src/pcl/low.lisp (symbolicate*): Renamed from symbolicate. * src/pcl/std-class.lisp (shared-initialize): * src/pcl/defs.lisp (get-built-in-class-symbol) (get-built-in-wrapper-symbol): * src/pcl/braid.lisp (initial-classes-and-wrappers) (bootstrap-meta-braid): Use symbolicate*. * src/pcl/macros.lisp (dolist-carefully): Removed. (true, false, zero): Moved to defclass.lisp. (printing-random-thing-internal): Removed. (printing-random-thing): Removed. (rassq): Removed. (*keyword-package*): Removed. (make-keyword): Removed; import from cl. (memq, delq, assq): Macros removed, import from ext. (get-declaration): Moved to boot.lisp, where it's used. * src/pcl/boot.lisp (get-declaration): Moved here from macros.lisp. * src/pcl/methods.lisp (named-object-print-function, print-object): * src/pcl/low.lisp (print-std-instance): * src/pcl/dfun.lisp (print-dfun-info): * src/pcl/cache.lisp (print-cache, print-wrapper): * src/pcl/boot.lisp (make-early-gf): Use print-unreadable-object instead of printing-random-thing. * src/pcl/defclass.lisp (true, false, zero): Moved here from macros.lisp. * src/pcl/methods.lisp (legal-qualifiers-p) (legal-specializers-p): Use dolist.
Detect odd-length keyword argument lists, invalid keyword arguments is methods. Change lambda-lists of some gfs and methods to include &key, or &key &allow-other-keys. Bugs found by Paul Dietz in his test suite. * src/pcl/boot.lisp (bind-args): Handle the case that &key is in the lambda-list, but no keyword args. (get-key-arg1): Additional argument first-time; check for invalid keyword arguments, and add number of args when true. (get-key-arg): Call get-key-arg1. (odd-number-of-keyword-arguments, invalid-keyword-argument): New functions. * src/pcl/init.lisp (make-instance) <symbol, class>: Add &key. (initialize-instance) <slot-object>: Likewise. (reinitialize-instance) <slot-object>: Likewise. (update-instance-for-different-class): Likewise. (update-instance-for-redefined-class): Likewise. (shared-initialize) <slot-object>: Likewise. * src/pcl/std-class.lisp (change-class): Likewise. * src/pcl/slots.lisp (allocate-instance) <standard-class>: (allocate-instance) <structure-class>: Likewise. * src/pcl/methods.lisp (reinitialize-instance) <standard-method>: Likewise. * src/pcl/generic-functions.lisp (change-class) (allocate-instance, update-instance-for-different-class) (update-instance-for-redefined-class): Add &key &allow-other-keys. * src/pcl/fsc.lisp (allocate-instance) <funcallable-standard-class>: Add &key. * src/pcl/std-class.lisp (make-defstruct-allocation-function): Fix a paren bug.
Make slot locations more intuitive; preserve slot locations of inherited slots. This partially a change from 2002-12-24 that made compute-slots compatible with SBCL. * src/pcl/std-class.lisp (compute-slots): Map over slots in reverse cpl order so that inherited slots are more likely to get the same locations as in superclasses. * src/pcl/rt/ctor.lisp: Tests changed accordingly.
Make ALLOCATE-INSTANCE work on structures defined with DEFSTRUCT. Detected by Paul Dietz' tests. * src/pcl/std-class.lisp (make-defstruct-allocation-function): New function. (shared-initialize) <structure-class>: Use it.
Make DIRECT-SLOT-DEFINITION-CLASS and EFFECTIVE-SLOT-DEFINITION-CLASS AMOP compliant. From Kevin Rosenberg on cmucl-imp 2003-04-29. * src/pcl/std-class.lisp (direct-slot-definition-class): (effective-slot-definition-class): Change methods accordingly. (make-direct-slotd): Apply direct-slot-definition-class to initargs instead of funcalling it. (compute-effective-slot-definition): Likewise for effective-slot-definition-class. * src/pcl/generic-functions.lisp (direct-slot-definition-class) (effective-slot-definition-class): Make initargs a &rest arg.
ANSI test CLASS-0211B.1. Initforms of shared slots inherited from superclasses. * src/pcl/std-class.lisp (update-shared-slot-values): New function. (update-class): Call it. (shared-initialize): Slightly rewritten.
Test cases CLASS-REDEFINITION. from Paul Dietz' ANSI tests. * src/pcl/std-class.lisp (update-cpl): Force cache flushes if we won't reuse the wrapper because there are class slots.
MOP bug fix for problem with (SETF SLOT-VALUE-USING-CLASS) reported by Kevin Rosenberg <email@example.com> on cmucl-imp, Tue, 22 Apr 2003 13:28:23 -0600. There's a test case in the thread on cmucl-imp. * src/pcl/methods.lisp (update-slot-value-gf-info): Moved here from slots-boot.lisp. (get-accessor-method-function): Don't pass nil wrappers to get-secondary-dispatch-function. See comment there. (update-gf-dfun): Remove unused code. * src/pcl/slots-boot.lisp (get-accessor-from-svuc-method-function): Move to methods.lisp, where it's used. * src/pcl/std-class.lisp (compute-slot-accessor-info): Add comment. Code cleanup. * src/pcl/std-class.lisp (compute-default-initargs): Don't use a recursive local function for something that can be done with loop in 2 lines.
Further fixes for making SUBTYPEP work with forward-referenced classes. * src/pcl/std-class.lisp (make-preliminary-layout): Map over subclasses, updating preliminary cpl info. * src/pcl/rt/defclass.lisp (defclass-types.6): New test.
The SEQUENCE-COUNT type was previously used in c:fndb, but since C::SEQUENCE-COUNT /= KERNEL::SEQUENCE-COUNT, it was an unknown type. Please read boot4.lisp. * src/code/exports.lisp ("KERNEL"): Export sequence-count. * src-types/bootfiles/18e/boot4.lisp: New file. Make compute-effective-slot-definition AMOP compliant. Patch from Kevin Rosenberg. * src/pcl/std-class.lisp (compute-slots): Pass slot name to compute-effective-slot-definition. (compute-slots): Likewise. (compute-effective-slot-definition): Add parameter slot-name. * src/pcl/generic-functions.lisp (compute-effective-slot-definition): Add second parameter slot-name. Allow non-keyword keyword names in lambda lists. This fixes test cases STRUCTURE-BOA-TEST-15/[1-8], and FLET.30. * src/compiler/node.lisp (arg-info): Accept non-keyword keyword names. * src/code/type.lisp (key-info): Likewise. Fix type system bugs detected by Paul Dietz' test suite This is to a large extent a port from SBCL. * src/code/type.lisp: Mostly rewritten with code ported from SBCL. * src/compiler/typetran.lisp (ir1-transform-type-predicate): Return nil if type is *empty-type*. (source-transform-negation-typep) (source-transform-intersection-typep): New functions. (source-transform-array-typep): Handle unknown array element types. (typep): Add handling of negation and intersection types. * src/compiler/srctran.lisp (make-canonical-union-type): Simplify, now that #'type-union is smarter. (ir1-transform-<-helper): Give up on non-numeric, non-member types. * src/compiler/checkgen.lisp (type-test-cost): Add a case for intersection-type. (values-types-asserted): Don't use coerce-to-values, see the comment there. * src/compiler/array-tran.lisp (array-dimension): Accept :maybe as array-type-complexp. * src/code/pred.lisp (%%typep): Add handling of negation-types and intersection-types. Change cases of hairy-types, union-types, and arrays with unknown element type. * src/code/exports.lisp ("KERNEL"): Export negation-type, negation-type-type, intersection-type, intersection-type-types. * src/code/class.lisp (sealed-class-intersection): Return one value. (class :simple-intersection): Return one value, return nil in the default case. (class :complex-subtypep-arg2): New type method.
* pcl/std-class.lisp (update-class-can-precede-p): Rewritten. (update-slots): Slightly rewritten; don't use the old wrapper if the class isn't finalized. * pcl/rt/defclass.lisp (defclass-forward-referenced-class.1): New test.
Fix TYPEP/SUBTYPEP problems with unfinalized and forward-referenced classes. * pcl/std-class.lisp (class-finalized-p): Method removed. (*allow-forward-referenced-classes-in-cpl-p*): New variable. (make-preliminary-layout): New function. (shared-initialize) <:after std-class>: Call make-preliminary-layout. (shared-initialize) <:after forward-referenced-class>: New method calling make-preliminary-layout. (shared-initialize) <:after structure-class>: Set finalized-p slot to true. (update-slots): Likewise. (shared-initialize) <:after condition-class>: Likewise. (inform-type-system-about-class): New method for forward-referenced classes. (class-has-a-forward-referenced-superclass-p): Moved to info.lisp. * pcl/cpl.lisp (compute-std-cpl-phase-1): Allow forward-referenced classes in the cpl if *allow-forward-referenced-classes-in-cpl-p* is true. * info.lisp (class-has-a-forward-referenced-superclass-p): Moved here from std-class.lisp. * pcl/cache.lisp (make-wrapper): Handle forward-referenced classes. * pcl/braid.lisp (bootstrap-initialize-class): Set the finalized-p slot. * pcl/defs.lisp (class): Add slot finalized-p. * pcl/rt/defclass.lisp (defclass-types.[0-5]) (defclass-forward-referenced-class.0): New tests. Misc fixes. * pcl/defclass.lisp (expand-defclass): Remove code papering over a potential compiler bug. * pcl/macros.lisp (find-class-cell-make-instance-function-keys): Removed. (setf find-class): Add errorp and environment parameters, call (setf kernel::find-class) if new-value is nil.
* pcl/std-class.lisp (ensure-class-using-class): Pass initargs to change-class.
* pcl/std-class.lisp (shared-initialize): Check that reader is fboundp, like for the writer.
Make classes FIND-CLASSable early, for MOP programming, and for compatibility with other Lisps. * pcl/std-class.lisp (update-class): (setf find-class) here. (shared-initialize) <:after std-class>: Call update-class after setting the class predicate. Make ENSURE-CLASS-USING-CLASS AMOP compliant. * pcl/std-class.lisp (ensure-class, ensure-class-using-class) (ensure-class-using-class): Exchange first and second arg for AMOP compliance. * pcl/generic-functions.lisp (ensure-non-standard-class): Likewise. * pcl/braid.lisp (ensure-non-standard-class): Likewise.
Break some vicious metacircles. * pcl/dfun.lisp (*standard-classes*, *standard-slot-locations*): New variables. (compute-standard-slot-locations, standard-slot-value) (standard-slot-value/gf, standard-slot-value/method) (standard-slot-value/eslotd, standard-slot-value/class) (maybe-update-standard-class-locations): New functions. (*cmv-stack*): New variable. (cache-miss-values-internal): Use it to detect vicious circles, and call break-vicious-metacircle. (break-vicious-metacircle, accesses-standard-class-slot-p) (find-standard-class-accessor-method): New functions. * pcl/std-class.lisp (update-slots): Call maybe-update-standard-class-locations. * pcl/fixup.lisp (toplevel): Call compute-standard-slot-locations.
* std-class.lisp (class-direct-slots, class-slots) (class-default-initargs, class-direct-default-initargs): Add methods for condition-class. * dfun.lisp (saut-class): Change a let to let*.
* bootfiles/18e/boot.lisp: Bootstrap files for the lisp:class = pcl:class part. To get it booted from 18e, cross-compile using boot1.lisp as bootstrap.lisp in pmai's build scripts, then do a normal compile with boot2.lisp as bootstrap.lisp with the resulting Lisp. * code/byte-interp.lisp, code/defstruct.lisp, code/describe.lisp: * code/error.lisp, code/exports.lisp, code/hash-new.lisp: * code/hash.lisp, code/macros.lisp, code/misc.lisp: * code/package.lisp, code/pred.lisp, code/sharpm.lisp, code/type.lisp: * compiler/dump.lisp, compiler/fndb.lisp, compiler/globaldb.lisp: * compiler/proclaim.lisp, compiler/typetran.lisp, compiler/xref.lisp: * compiler/generic/primtype.lisp, compiler/generic/vm-type.lisp: Changes for to use kernel::class etc. * code/class.lisp (toplevel): Shadow class, built-in-class etc. (class): Give it conc-name %class-. (toplevel) [#+bootstrap-lisp-class=pcl-class]: Define old accessors. (everywhere): Use new class accessors. * compiler/generic/vm-fndb.lisp (%make-instance): Change from unsafe to flushable and movable. * code/ntrace.lisp (expand-trace, untrace): Changes for method tracing. * code/profile.lisp (profile, profile-all, unprofile): Method profiling. * pcl/*.text, pcl/bench.lisp, pcl/extensions.lisp: * pcl/fast-init.lisp, pcl/precom1.lisp, pcl/precom4.lisp: * pcl/structure-class.lisp, pcl/user-instances.lisp: Removed. * tools/pclcom.lisp: Changes for my PCL and lisp:class = pcl::class.
* pcl/defs.lisp (standard-method): Change superclass plist-mixin to documentation-mixin so that we don't throw away the method documentation. * pcl/cmucl-documentation.lisp (setf documentation): Use set-random-documentation. * pcl/defcombin.lisp (set-random-documentation): New function. (load-short-defcombin, load-long-defcombin): Use it. * pcl/env.lisp (describe-object) <standard-generic-function>: Print the generic function doc string, if any. Print method doc strings. (describe-object) <class>: Print slots. * code/describe.lisp (describe-symbol): If a class names a PCL class, describe-object the PCL class.
Entomotomy Bug: redefining-class-breaks-accessing-of-class-slots Commited patch by Gerd Moellmann that fixes a bug in the accessing of class-slots for redefined classes in certain cases, due to caches not being flushed because of reused wrappers.
Entomotomy Bug: finalize-inheritance-missing-method-on-forward-referenced-class As noted by Gerd Moellmann, PCL needs a method on finalize-inheritance specialized for forward-referenced-class, which signals a relevant error, since forward-referenced-classes can't be finalized.
Entomotomy Bug: finalize-instance-not-being-called-on-class-finalization Fix to ensure that finalize-inheritance (the bug's name is a misnomer) is called on class-finalization, from Gerd Moellmann via SBCL.
Entomotomy Bug: slot-definition-allocation-not-amop-compliant Added needed second half of patch, from Gerd Moellmann via SBCL, to cure newly introduced problem with inheritance of class slots. Also committed modified version (again via SBCL) of Gerd's COMPUTE-SLOTS revamp for more modular computation of slot locations.
Entomotomy Bug: slot-definition-allocation-not-amop-compliant Committed a slightly adjusted patch from Gerd Moellmann, which makes the GF slot-definition-allocation return :class for class slots, as specified by AMOP, instead of the class object, as it did previously.
Entomotomy Bug: redefined-classes-and-subtypep This patchset by Gerd Moellmann reenables the previous fix to this bug, without retriggering the obsolete-instance-trap-on-redefined-class bug. Additionally, this cleans up the layout-invalid vs. wrapper-state logic making the code much easier to follow.
Merged patch by Gerd Moellmann to replace (load-truename) with *load-pathname*, thus dropping the function load-truename, in order to improve location-independent source recording.
Committed patch by Gerd Moellmann to rename the constant *slot-unbound* to the more fitting name +slot-unbound+.
Committed patches by Gerd Moellmann to eliminate PCL's without-interrupts in favour of either system:without-interrupts (for non-MP versions), and a lock-based approach for MP versions. Note that the latter is a bit experimental, see the comments in the code for details.
Patch from Gerd Moellmann to modify more simple-program-error sites to use the new simple-program-error function.
Huge patch by Gerd Moellmann that removes PCL::ITERATE and PCL::GATHER* in favor of normal CL constructs. In a similar vein to SBCL, this patch also replaces all uses of #'(lambda ...) by just (lambda ...), and removes now-dated looking quotes in front of self-evaluating objects, like keywords and t/nil. The patch has been slightly frobbed by me, to correct a couple of slight oversights, and make more effective use of the loop facility in a number of places.
Patch from Gerd Moellmann to bring error detection of defclass in line with ANSI requirements: o If there are any duplicate slot names, an error of type program-error is signaled. o If an initialization argument name appears more than once in :default-initargs class option, an error of type program-error is signaled. o If any of the following slot options appears more than once in a single slot description, an error of type program-error is signaled: :allocation, :initform, :type, :documentation.
This fixes a bug noted by Nicolas Neuss, where executing a defclass form with a metaclass of structure-class would result in the generation of recursive print-object methods, so that the printing of instances of such a class would result in an endless loop. The bug was caused by the changes that made structure-printing ANSI compliant. Removing a now redundant :print-function option to the automatically generated defstruct form cured the problem.
Make change-class ANSI-compliant, by allowing the passing of initargs. This fix is thanks to Espen S. Johnsen, who noted that update-instance-for-different-class already supported the passing of initargs, so that the fix is only to make change-class accept initargs, and pass them along to u-i-f-d-c. Also fixes a probably undetected bug in change-class with a lisp::class second argument (bogus apply in env.lisp).
Fixed AMOP conformance bug of ensure-class-using-class reported by Hannu Koivisto: ensure-class-using-class shouldn't default unsupplied :direct-superclasses or :direct-slots arguments in its calls to make-instance and reinitialize-instance. Code audit showed that only coerce-to-class relied on the old behaviour. This was necessary because the initialization code for std-class didn't default an unsupplied value for :direct-superclasses correctly, producing a class with no direct superclasses, contrary to the AMOP. Fixed this as well.
From Pierre Mai: o All the stuff from cmu-low.lisp has been merged into low.lisp. o Therefore cmu-low.lisp has been removed completely. o All the stuff in low.lisp which either wasn't used in current PCL or was unnecessary in CMU CL, or which was implemented as no-ops for CMU CL has been removed. o Calls in other files to functions which were dropped have been removed. o Source order reorganised a bit and added several comments and doc-strings. o Made `*optimize-speed*' consistent for small and non-small cores, and fixed ordering problem. o Added `*compile-lambda-silent-p*' which when true (the default) will cause compile-lambda to be silent when compiling PCL-generated code.
These changes remove some obsolete and unused type system interface codes, and introduces code to "inform-type-system-about-std-class". The effect of this new code is to put minimal class definitions into the compile-time environment to prevent undefined-type warnings. These definitions are replaced with the correct class defs at load-time.
Remove all #+ and #- conditionals from the source code. What is left is essentially Common Lisp except for explicit references to things in CMUCL specific packages.
Further cleanup of the code now that the :SETF feature is assumed standard.
Cleanup of the PCL directory. Removed files and conditional code for long dead lisp implementations. Some parts of the code is now a bit easier to read and (hopefully) understand.
Modifies EXPAND-DEFCLASS to substitute pcl::standard-class for lisp:standard-class in the superclass list given to defclass. This is consistent with the treatment given the :metaclass option argument. std-class.lisp is restored to its original state wiping out all traces of bogus change introduced in revision 1.19.
Backout previous change to ensure-class-values. There is more to this bug than previously thought.
Fix ENSURE-CLASS-VALUES so that (defclass myclass(standard-class)()) works the same as (defclass myclass()()). Had to map LISP:STANDARD-CLASS to PCL::STANDARD-CLASS when the former was explicitly provided.
Add CMUCL style file-comments; from Peter Van Eynde.
When initialising class metaobjects and the direct-superclasses is null or empty, it should default to funcallable-standard-object if the class is an instance of funcallable-standard-class whereas it was always defaulting to standard-class. Catch attempts to change the class of an instance via change-class between the incompatible standard-class and funcallable-standard-class metaclasses.
Since funcallable-standard-objects are now disjoint from standard-objects, classes with meta-class standard-class are no longer valid super-classes of classes with meta-class funcallable-standard-class, so validate-superclass should now return NIL for this combination. Further classes with meta-class std-class are now valid superclasses of classes with meta-class of either standard-class or funcallable-standard-class; add validate-superclass methods allowing such super-classes which are handy for mixins of both standard-objects and funcallable-standard-objects.
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.
Gray streams support: * Rename the 'stream structure class to sys:lisp-stream. * Add a new none hierarchical 'stream built-in class which inherits from: instance, t. * Hack in the new stream class as a mixin for the structure base lisp-stream class which now inherits from: stream, structure-object, instance, t. * Add a new 'fundamental-stream standard-class which includes 'stream as a mixin, and add PCL hacks to allow this to be redefined after PCL is loaded to be (defclass fundamental-stream (standard-object stream) ...). * Add appropriate support to the base stream functions to dispatch to the Gray stream functions for the handling of fundamental-streams. Some of the lisp-streams encapsulating CLOS streams still need a little work.
Within update-cpl, setup the class precedence list before of the class before calling force-cache-flushes as this in turn calls update-lisp-class-layout which need the cpl to correctly setup the layout inherits.
This set of changes enables the use of forward referenced classes in PCL. The problem was(is) that the wrapper object needed to connect the Lisp type system to PCL classes doesn't exist until the forward-referenced-class is defined. At that time all the subclasses of it are initialized and wrappers attached. In the meantime, the actual forward referenced class is an instance of pcl::forward-referenced-class and any subclasses are pcl class instances with most slots nil. The fix herein arranges for UPDATE-LISP-CLASS-LAYOUT to also set the lisp:class-name and use (setf lisp:find-class) to connect the new layout to the Lisp class system. An undesired consequence of this is that DEFCLASS can't return a valid class object unless all superclasses are defined. This shouldn't be a real problem as the classes can't be used in the intermediate state, but the HyperSpec says DEFCLASS returns a class object. We return a valid class object or NIL.
Re-define the documentation function according to the ANSI CL spec.; the doc-type argument is no longer optional.
Stop the documentation function calling the lisp::documentation function; causes a loop.
This commit brings the PCL repository up to release 17f and also includes the changes in the X86 1.03.7 kit. Although the 1.03.7 changes were already in the repository, the other files appear to be of early vintage and do not work with a 17f system. Hopefully all is correctly synched now.
Changed the definition of force-cache-flushes by removing unnecessary call to update-constructors, as suggested by Richard Harris.
September-16-92-PCL-e has been incorporated into the CMUCL sources thanks to Rick Harris.
This is September 92 PCL.
This is July 92 PCL
This is March-92-PCL-2a.
Deleted spurious line at EOF due to non-newline termination in merge.
Merged with latest PCL version.
This form allows you to request diffs between any two revisions of this file. For each of the two "sides" of the diff, select a symbolic revision name using the selection box, or choose 'Use Text Field' and enter a numeric revision.
|Powered by ViewVC 1.1.5|