- Sep 25, 2004
-
-
rtoy authored
specializer. Fixes a bug reported by Bruno Haible, cmucl-imp, 2004-09-15.
-
- Jul 09, 2004
-
-
rtoy authored
instance of the condition. (Bug reported on sbcl-help. Fix stolen from sbcl.)
-
- Apr 06, 2004
-
-
rtoy authored
cmucl-imp: The patch below adds a somewhat general mechanism to the get the "current location". So every macro that wants to record the source location, can insert a call to SOURCE-LOCATION in the generated code and safe the result in a appropriate place. SOURCE-LOCATION is a compiler-macro and returns a quoted struct with the source info. The patch adds the definition for SOURCE-LOCATION some modifications for the defclass, defgeneric and defmethod macros. Classes, generic functions and methods have already a "source" slot and the result of SOURCE-LOCATION is just stored into that slot. (The source slot contains currently only the *loadpath*, which is is not very useful, if the fasl file is in a different directory than the source file.)
-
- Oct 29, 2003
-
-
gerd authored
parameters that are being assigned to in the method body. Reported by Hans Chalupsky on cmucl-imp. * src/pcl/boot.lisp (method-parameter): New function, extracted from make-pv-call. (assigned-method-params): New function. (make-method-lambda-internal): Call it to disable optimizations on method parameters being assigned to. * src/pcl/method-slot-access-optimization.lisp (get-param/class-to-optimize): Use new function method-parameter. * src/pcl/gf-call-optimization.lisp (make-pv-call): Ditto. * src/pcl/std-class.lisp (ensure-class-using-class): Don't setq a method parameter.
-
- Jun 15, 2003
-
-
gerd authored
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.
-
- Jun 10, 2003
-
-
gerd authored
* src/pcl/std-class.lisp (ensure-class): Redefine a class only if the specified name is the proper name of the class.
-
- May 28, 2003
-
-
gerd authored
* 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.
-
- May 25, 2003
-
-
gerd authored
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 ).
-
- May 20, 2003
-
-
gerd authored
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.
-
- May 11, 2003
-
-
gerd authored
* 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.
-
- May 10, 2003
-
-
gerd authored
* 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.
-
gerd authored
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.
-
- May 08, 2003
-
-
gerd authored
if shared slot is still unbound. Thanks to Christophe Rhodes.
-
- May 04, 2003
-
-
gerd authored
* 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.
-
gerd authored
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.
-
- May 03, 2003
-
-
gerd authored
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.
-
- Apr 29, 2003
-
-
gerd authored
Detected by Paul Dietz' tests. * src/pcl/std-class.lisp (make-defstruct-allocation-function): New function. (shared-initialize) <structure-class>: Use it.
-
gerd authored
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.
-
- Apr 26, 2003
-
-
gerd authored
from superclasses. * src/pcl/std-class.lisp (update-shared-slot-values): New function. (update-class): Call it. (shared-initialize): Slightly rewritten.
-
gerd authored
* src/pcl/std-class.lisp (update-cpl): Force cache flushes if we won't reuse the wrapper because there are class slots.
-
- Apr 25, 2003
-
-
gerd authored
reported by Kevin Rosenberg <kevin@rosenberg.net> 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.
-
- Apr 18, 2003
-
-
gerd authored
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.
-
- Apr 13, 2003
-
-
gerd authored
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.
-
- Apr 07, 2003
-
-
gerd authored
(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.
-
- Apr 06, 2003
-
-
gerd authored
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.
-
- Apr 03, 2003
-
-
gerd authored
to change-class.
-
- Mar 30, 2003
-
-
gerd authored
is fboundp, like for the writer.
-
gerd authored
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.
-
- Mar 28, 2003
-
-
gerd authored
* 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.
-
- Mar 25, 2003
-
-
gerd authored
(class-default-initargs, class-direct-default-initargs): Add methods for condition-class. * dfun.lisp (saut-class): Change a let to let*.
-
- Mar 22, 2003
-
-
gerd authored
= 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.
-
- Feb 06, 2003
-
-
gerd authored
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.
-
- Jan 03, 2003
-
-
pmai authored
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.
-
pmai authored
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.
-
pmai authored
Fix to ensure that finalize-inheritance (the bug's name is a misnomer) is called on class-finalization, from Gerd Moellmann via SBCL.
-
- Dec 22, 2002
-
-
pmai authored
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.
-
- Dec 18, 2002
-
-
pmai authored
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.
-
- Oct 29, 2002
-
-
pmai authored
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.
-
- Oct 19, 2002