Skip to content
Snippets Groups Projects
  1. Dec 22, 2006
    • rtoy's avatar
      Fix issue reported by Albert Reiner, cmucl-help, 2006/10/20, and fix · 7b9a9f98
      rtoy authored
      another issue with uninitialized &aux variables.
      
        (defstruct (foobar
                     (:constructor make-foobar
                                   (xxx
                                    &key (aaa nil) (bbb nil)
                                    &aux
                                    (foobar-data xxx)
                                    (aaa (or aaa
                                             (getf foobar-data :aaa)
                                             1))
                                    (bbb (or bbb
                                             (getf foobar-data :bbb)
                                             (1+ aaa))))))
          (aaa (required-argument) :type fixnum)
          (bbb (required-argument) :type fixnum))
      
        (make-foobar nil) -> #<foobar :aaa 1 :bbb 2>
      
      But CMUCL gives type errors.
      
      To fix Albert's issue, modify CREATE-BOA-CONSTRUCTOR to keep track of
      the &aux vars separately from the other arglist vars.  Adjust
      CREATE-VECTOR-CONSTRUCTOR, CREATE-LIST-CONSTRUCTOR,
      CREATE-STRUCTURE-CONSTRUCTOR, and CREATE-FIN-CONSTRUCTOR to take an
      extra arg for the &aux vars.  For CREATE-STRUCTURE-CONSTRUCTOR, we
      only put declarations for the other arglist vars.  To make sure we
      store the right kinds of objects into the slots, we also wrap (the
      <type> init) for each initial value.
      
      Also CLHS 3.4.6 has an example of a boa constructor using an aux
      variable without an initializer.  CMUCL was not handling that right.
      Modify CREATE-BOA-CONSTRUCTOR to change the initializer to use (or
      <aux> slot-default-value) to get the correct default value into the
      slot if the aux variable doesn't.
      7b9a9f98
  2. Oct 21, 2005
  3. Oct 05, 2004
  4. Sep 03, 2004
    • rtoy's avatar
      The CLHS entry for *PRINT-LENGTH* says · 9836e815
      rtoy authored
          If an object to be recursively printed has components and is at a
          level equal to or greater than the value of *print-level*, then
          the object is printed as ``#''.
      
      Adjust the default structure printer and %print-unreadable-object to
      do this.  This fixes the PRINT-LEVEL.2, PRINT-LEVEL.6, PRINT-LEVEL.8,
      and PRINT-LEVEL.9. test failures.
      9836e815
  5. Mar 31, 2004
    • emarsden's avatar
      · ef5d5943
      emarsden authored
       - restarts when a package lock is triggered by DEFSTRUCT redefinition:
         disable the package-definition-lock instead of the package-lock (from
         Helmut Eller)
      ef5d5943
  6. Aug 08, 2003
    • emarsden's avatar
      Add a function EXT:UNLOCK-ALL-PACKAGES, that disables both the · 1a960279
      emarsden authored
      structural and the definition locks for all existing packages. Add an
      additional restart to the PACKAGE-LOCKED-ERROR signaling points that
      allows the user to disable all packages then continue.
      
      Package locks are initialized upon startup, so the unlocking only
      takes effect during the current session. However, this function
      doesn't suffer from the problem that affects
      LISP::*ENABLE-PACKAGE-LOCKED-ERRORS* (which is bound by LOAD so can't
      be set from an initialization file).
      1a960279
  7. Aug 06, 2003
    • gerd's avatar
      Dynamic-extent closures for x86. Use boot15.lisp for · 5ac014db
      gerd authored
      	bootstrapping.
      
      	(defun prn (fn)
      	  (print (funcall fn)))
      
      	(defun foo (x)
      	  (flet ((bar () x))
      	    (declare (dynamic-extent #'bar))
      	    (prn #'bar)))
      
      	=> The closure for BAR is allocated from the stack
      
      	* src/compiler/node.lisp (lexenv): Add slot dynamic-extent.
      
      	* src/compiler/ir1util.lisp (make-lexenv): Add keyword
      	arg for dynamic-extent.
      
      	* src/code/defstruct.lisp (%redefine-defstruct)
      	[#+bootstrap-dynamic-extent]: Definition that corresponds
      	to to the clobber-it restart.
      
      	* src/compiler/ir1tran.lisp (process-dynamic-extent-declaration):
      	Rewritten.
      
      	* src/compiler/x86/alloc.lisp (make-closure): Add constant
      	arg dynamic-extent, and use it for allocation.
      
      	* src/compiler/ir2tran.lisp (ir2-convert-closure) [#+x86]:
      	Pass dynamic-extent to the make-closure vop.
      5ac014db
  8. Jun 20, 2003
  9. Jun 18, 2003
    • gerd's avatar
      Remove package nicknames USER from COMMON-LISP-USER. Add a new · b4f2c7c7
      gerd authored
      	package COMMON-LISP which LISP uses, so that COMMON-LISP no longer
      	has the non-ANSI nickname LISP.
      
      	To bootstrap, use boot13.lisp as target:bootstrap.lisp with pmai's
      	build scripts, and do a full compile.
      
      	* src/bootfiles/18e/boot13.lisp: Change for all the package
      	changes.
      
      	* src/code/exports.lisp: New package common-lisp,
      	which lisp uses.
      
      	* src/tools/worldload.lisp:
      	* src/tools/setup.lisp: Use cl-user instead of user.
      	Use lisp:: instead of cl::.
      
      	* src/tools/worldcom.lisp:
      	* src/tools/snapshot-update.lisp:
      	* src/tools/pclcom.lisp:
      	* src/tools/mk-lisp:
      	* src/tools/hemcom.lisp:
      	* src/tools/config.lisp:
      	* src/tools/comcom.lisp:
      	* src/tools/clxcom.lisp:
      	* src/tools/clmcom.lisp:
      	* src/pcl/defsys.lisp:
      	* src/motif/lisp/initial.lisp:
      	* src/interface/initial.lisp:
      	* src/hemlock/lispmode.lisp (setup-lisp-mode):
      	Use cl-user instead of user.
      
      	* src/code/save.lisp (assert-user-package):
      	* src/code/print.lisp (%with-standard-io-syntax): Find
      	cl-user package instead of user.
      
      	* src/code/package.lisp (package-locks-init): Add lisp.
      	(package-init): Don't add user nickname to cl-user.
      
      	* src/code/ntrace.lisp (*trace-encapsulate-package-names*):
      	Add common-lisp.
      
      	* src/code/hash.lisp (toplevel):
      	* src/code/hash-new.lisp (toplevel): Use in-package :lisp
      	instead of :common-lisp.
      
      	* src/code/float-trap.lisp (sigfpe-handler): Don't
      	qualify floating-point-inexact with ext:.
      
      	* src/pcl/simple-streams/strategy.lisp (sc):
      	* src/pcl/simple-streams/null.lisp (null-read-char):
      	* src/pcl/simple-streams/internal.lisp (allocate-buffer)
      	(free-buffer):
      	* src/pcl/simple-streams/impl.lisp (%check, %read-line)
      	(%peek-char, %read-byte):
      	* src/pcl/simple-streams/file.lisp (open-file-stream)
      	(device-close):
      	* src/pcl/simple-streams/classes.lisp (simple-stream)
      	(device-close):
      	* src/pcl/macros.lisp (toplevel):
      	* src/pcl/braid.lisp (lisp::sxhash-instance):
      	* src/pcl/env.lisp (toplevel):
      	* src/compiler/generic/objdef.lisp (symbol-hash):
      	* src/code/stream.lisp (read-sequence, write-sequence):
      	* src/code/macros.lisp (defmacro, deftype):
      	* src/code/eval.lisp (interpreted-function):
      	* src/code/defstruct.lisp (defstruct):
      	* src/code/debug.lisp (debug-eval-print): Use lisp:: instead
      	of cl::.
      b4f2c7c7
  10. May 28, 2003
    • gerd's avatar
      Structure slot names can be any symbol. Found by Paul Dietz. · 3bbc7259
      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.
      3bbc7259
  11. May 20, 2003
    • gerd's avatar
      Store user-specified slot names in DEFSTRUCT-SLOT-DESCRIPTIONs, · 20254db5
      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.
      20254db5
  12. May 12, 2003
    • gerd's avatar
      * src/code/defstruct.lisp (defstruct): Handle uninterned · 52eecc9b
      gerd authored
      	struct names.
      52eecc9b
    • emarsden's avatar
      · 807d6f0f
      emarsden authored
      Add package locks. Bootfile boot8.lisp allows this to build without
      a cross-compile (or just select the CLOBBER-IT restart).
      
         - two extra PACKAGE-LOCK and PACKAGE-DEFINITION-LOCK slots added to
           the package structure. These can be modified using the
           EXT:PACKAGE-LOCK and EXT:PACKAGE-DEFINITION-LOCK accessors.
      
         - macro EXT:WITHOUT-PACKAGE-LOCKS that evaluates forms with all
           package locks disabled (this is done by binding the global
           variable CL::*ENABLE-PACKAGE-LOCKED-ERRORS*)
      
         - new PACKAGE-LOCKED-ERROR condition
      
         - in SETF-FDEFINITION-HOOK and in the DEFMACRO, DEFSTRUCT, DEFTYPE
           and DEFCLASS defining forms, check whether the definition would
           modify a package whose definition-lock is enabled, and signal a
           package-locked-error condition with restarts that allow you to
           unlock the package or ignore the lock
      
         - in EXPORT, UNEXPORT etc check whether the target package is
           guarded by a package-lock, and signal an error
      
         - disable package locks when loading a subsystem
      
         - disable package locks in certain areas of PCL and in the
           MAKE-LOAD-FORM support of the compiler, where code is generated
           inside system packages at runtime
      807d6f0f
  13. Mar 30, 2003
    • gerd's avatar
      Update CLOS STRUCTURE-CLASSes on structure changes. · 3279c041
      gerd authored
      	* pcl/braid.lisp (ensure-non-standard-class): Add optional
      	parameter existing-class.
      	(reinitialize-structure-class): New function.
      	(toplevel): Push it on kernel::*defstruct-hooks*.
      
      	* code/defstruct.lisp (*defstruct-hooks*): New variable.
      	(%defstruct): Call these hooks.
      
      	* tools/pclcom.lisp (find-package): Remove
      	pcl::reinitialize-structure-class from kernel::*defstruct-hooks*.
      3279c041
  14. Mar 27, 2003
  15. Mar 22, 2003
    • gerd's avatar
      * bootfiles/18e/boot[12].lisp: Bootstrap files for the lisp:class · a1e3ed93
      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.
      a1e3ed93
  16. Feb 01, 2003
    • gerd's avatar
      Fix bugs detected by Paul Dietz' ANSI test. · aba0e039
      gerd authored
      	* pcl/defs.lisp (make-class-predicate-name): Handle uninterned
      	symbols.
      
      	* code/defstruct.lisp (define-predicate): Don't error out on some
      	vector objects.
      	(dsd-inherited-p): Use dd-inherited-accessor-alist.
      aba0e039
  17. Jan 23, 2003
  18. Jan 03, 2003
    • toy's avatar
      Gerd Moellmann's port of SBCL's fix for the conc-name/structure · bfe697fa
      toy authored
      inheritance bug (SBCL bug 127).  Slightly modified to make building a
      little easier.
      
      Todo:  After the next release (18e) is done, go through and remove the
      old bootstrap-conc-name reader conditionals.  We want the
      #-bootstrap-conc-name versions.
      bfe697fa
  19. Dec 09, 2002
  20. Jul 31, 2002
  21. Apr 25, 2002
    • pmai's avatar
      Fix from SBCL: · be60f246
      pmai authored
      0.7.2.17:
      	Merged MNA "fix for boa-constructor bug" sbcl-devel 2002-04-16
      	... copied the fix to &optional arguments handling
      	... also test the &optional handling
      
      This fixes the handling of supplied-p args for &key and &optional args
      of boa-constructors.  Also did a couple of code cleanups in the process.
      be60f246
  22. Sep 21, 2001
    • pw's avatar
      Second attempt at using new cvs server. Hopefully mail system config · f2251d1b
      pw authored
      problems are fixed now.
      
      This revision fixes an omission from a previous rev that added support
      for :print-object and :print-function defstruct options. The default
      method created was calling DEFAULT-STRUCTURE-PRINT with only two
      arguments. It seems to work correctly now.
      f2251d1b
  23. Mar 15, 2001
    • pw's avatar
      Add support for ANSI specified :print-function and :print-object · d6c89eb6
      pw authored
      defstruct options while preserving previous behaviour. ANSI processing
      is enabled by ext:*ansi-defstruct-options-p* which must be NIL while
      compiling CMUCL, PCL, CLX, HEMLOCK to avoid flushing defined print-functions.
      This switch is turned ON when worldload builds a core with PCL in it.
      d6c89eb6
  24. Mar 04, 2001
  25. Jan 06, 2001
  26. Dec 03, 1999
  27. Sep 23, 1999
  28. Sep 22, 1999
    • dtc's avatar
      Revised fix for obtaining the structure slot accessor function given · 004cedf2
      dtc authored
      the defstruct-slot-descriptor which was broken for inherited slot as
      the dsd-accessor was set to Nil in this case. Rather than setting
      dsd-accessor to Nil for inherited slots, add a new function
      dsd-inherited-p to test if an accessor has been inherited, and always
      setup the dsd-accessor slot with the name of the accessor
      function. This allows the structure printer and inspect to easily
      obtain a slot accessor function.
      004cedf2
  29. Sep 20, 1999
    • pw's avatar
      DEFAULT-STRUCTURE-PRINT was puking on certain cases of structures that · 20f73982
      pw authored
      included other defstructs. An example of a failing case is:
      
      (defstruct a1 s1)
      (defstruct (a2 (:include a1)(:conc-name a1-)) s2)
      
      as seen in Hemlock source. The problem was that the dsd-accessor slot
      is documented to sometimes contain NIL but default-structure-print
      blindly called fdefinition on the sometimes NIL value. The fix here
      is to compute the slot accessor name from the conc-name and slot-name.
      
      NOTE: There is code in ir1tran that also blindly calls fdefinition
      on the contents of dsd-accessor. Don't know if this is a latent bug.
      20f73982
  30. Dec 19, 1998
  31. Jul 25, 1998
  32. Jul 24, 1998
  33. May 04, 1998
    • dtc's avatar
      Gray streams support: · 6c21ff8a
      dtc authored
      * 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.
      6c21ff8a
  34. Apr 20, 1998
    • pw's avatar
      This revision alters the condition type hierarchy to be in compliance · 4a42e17c
      pw authored
      with the ANSI spec. A default report method is attached to the
      serious-condition class and many of the uses of (error "string" arg..)
      in filesys.lisp and package.lisp were changed to use, for example,
      (error 'file-error :format-control "string" :format-arguments (list stuff))
      The end result is no obvious change to what the user sees, and enables
      one to establish a handler to catch the particular error type as
      mentioned in the "Exceptional Situations:" section of the CLHS
      write-ups. There probably are still some places where the error
      types need to be fixed.
      
      Also, a bug in with-package-iterator which caused failure with
      a null package-use-list was fixed, and some file functions (like
      truename and probe-file) now disallow a wild pathname.
      4a42e17c
  35. Mar 21, 1998
  36. Mar 03, 1998
  37. Mar 01, 1998
  38. Apr 09, 1997
    • dtc's avatar
      New value for the :pure option of defstruct, :substructure. Purify · 3d400aaa
      dtc authored
      will place the instance in the static space but still move the
      substructure lists and arrays to the RO space. This is needed for
      compact-info environments which cache the last name in the instance
      which needs to be scavenged, but the hash arrays can still be placed
      in the RO space (the cache name was not being scavenge which could
      cause a false hit if very unlucky). Shall uses this new option in
      compiler/globaldb.lisp after people have had a chance to bootstrap in
      this new support.
      3d400aaa
Loading