Skip to content
Snippets Groups Projects
  1. Nov 05, 2007
  2. Oct 25, 2007
    • rtoy's avatar
      Import Paul Foley's external-formats support. · e49c536b
      rtoy authored
      New files:
      o code/extfmts.lisp
      o pcl/simple-streams/external-formats/iso8859-1.lisp
      o pcl/simple-streams/external-formats/void.lisp
      
      code/exports.lisp:
      o Export the new symbols STRING-TO-OCTETS, OCTETS-TO-STRING,
        *DEFAULT-EXTERNAL-FORMAT*, ENCODE-STRING, and DECODE-STRING from the
        STREAM package
      o Make the symbols in the EXT package too.
      
      pcl/simple-streams/internal.lisp:
      o Move the implementation of STRING-TO-OCTETS and friends to a new
        file (extfmts.lisp).
      
      pcl/simple-streams/external-formats/utf-8.lisp:
      o New implementation.
      
      tools/make-main-dist.sh:
      o Create new target directory to hold external formats
      o Copy all of the external formats to the new directory.
      
      tools/pclcom.lisp:
      o Compile new code
      
      tools/worldcom.lisp:
      o Compile code/extfmts.lisp
      
      tools/worldload.lisp:
      o Load code/extfmts.lisp
      e49c536b
  3. Oct 08, 2007
  4. Sep 13, 2007
    • rtoy's avatar
      Oops. Really get rid of lisp::sxhash-instance. · 7d1f176f
      rtoy authored
      7d1f176f
    • rtoy's avatar
      Untracing of flet/labels functions wasn't working and neither was · 010270ec
      rtoy authored
      retracing flet/labels functions.  This was caused by the hash-table in
      *TRACE-FUNCTIONS* using an EQ test.  This doesn't work well when the
      functions are lists like (FLET INNER OUTER).
      
      code/ntrace.lisp:
      o Change *TRACED-FUNCTIONS* to use an EQUAL table so lists can match.
      
      pcl/braid.lisp:
      o Move LISP::SXHASH-INSTANCE to low.lisp because we need it defined
        earlier because of the change to tracing.  Can't build PCL without
        this change.
      
      pcl/low.lisp:
      o LISP::SXHASH-INSTANCE moved here.
      010270ec
  5. May 02, 2007
    • rtoy's avatar
      Apply fix for default-initargs where initialize-instance and · 41952a35
      rtoy authored
      shared-initialize were not getting :default-initargs.
      
      Patch from Madhu, Mar 28, 2007, based on fix in sbcl.
      
      pcl/ctor.lisp:
      o Pass default-initargs to initialize-instance and shared-initialize.
      
      pcl/rt/ctor.lisp:
      o Add test for this case
      
      pcl/rt/system.lisp:
      o Use *load-truename* to setup paths, instead of a hard-wired one.
      41952a35
  6. Feb 21, 2007
  7. Dec 21, 2006
    • rtoy's avatar
      Fix the bug reported by Madhu on cmucl-imp, 2006/12/16: · dd7132b7
      rtoy authored
      (defvar $f (open "/etc/passwd" :mapped t :class 'stream:file-simple-stream))
      (file-position $f)
      
      returns a negative value.
      
      I think this happens because of some possible confusion between
      buffer-ptr and buf-len in a mapped file-simple-stream.  I changed the
      code so that buffer-ptr is initialized to 0, and the various routines
      that check for eof compare buffpos against buf-len, instead of
      buffer-ptr.  I think this also means buffer-ptr is not used in mapped
      file-simple-streams.
      
      Add a couple of file-position tests too.
      dd7132b7
  8. Nov 30, 2006
  9. Oct 30, 2006
  10. Dec 01, 2005
  11. Nov 10, 2005
    • rtoy's avatar
      compiler/globaldb.lisp: · c9afe45f
      rtoy authored
      o Add a documentation type for the typed-structure class.
      
      pcl/cmucl-documentation.lisp:
      o Use the new type to add documentation support for structures of type
        list and vector.
      c9afe45f
  12. Oct 06, 2005
  13. Aug 18, 2005
  14. Jul 26, 2005
  15. Jul 13, 2005
  16. Jul 07, 2005
    • rtoy's avatar
      Fix for update-dependent on gfs, from Gerd Moellman, 2005-06-26: · dff333a3
      rtoy authored
      This is for one of Bruno's bug reports.  For example,
      
      (defclass upd-history ()
        ((history :initform ())))
      
      (defmethod update-dependent ((gf generic-function) (history upd-history)
      			     &rest args)
        (push args (slot-value history 'history)))
      
      (defun history-event-list (history)
        (mapcar (lambda (event)
      	    (mapcar (lambda (x)
      		      (if (typep x 'method)
      			  (list 'method (mapcar #'class-name
      						(method-specializers x)))
      			  x))
      		    event))
      	  (reverse (slot-value history 'history))))
      
      (let ((hist (make-instance 'upd-history)))
         (defgeneric upd0 (x))
         (add-dependent #'upd0 hist)
         (defmethod upd0 ((x integer)))
         (history-event-list hist))
      =>  ((add-method (method (integer)))))
      
      But, instead of the above expected result, it produces
      
      =>  (nil (add-method (method (integer)))))
      
      The nil is from a reinitialize-instance of the gf, which is triggered
      by load-defmethod calling ensure-generic-function, which in turn calls
      ensure-generic-function-using-class on the existing gf, which finally
      calls reinitialize-instance.
      
      I'm not 100% sure if this is correct or not.  My reading of CLHS/MOP
      is that this is at least not forbidden.  Opinions?
      
      	* src/pcl/methods.lisp (real-add-method, update-gf-dependents):
      	New function.
      	(real-add-method, real-remove-method): Call it.
      	(reinitialize-instance) <:around standard-generic-function>:
      	Update dependent objects.
      
      	* src/pcl/std-class.lisp (update-dependent): New default method.
      dff333a3
  17. Jun 20, 2005
    • rtoy's avatar
      From Gerd, cmucl-imp, 2005-06-18: · e5d1aeaf
      rtoy authored
      (progn
        (defclass foo92b (foo92a) ((s :initarg :s)))
        (defclass foo92a () ())
        (let ((x (make-instance 'foo92b :s 5)) (update-counter 0))
          (defclass foo92b (foo92a) ((s) (s1) (s2))) ; still subclass of foo92a
          (slot-value x 's)
          (defmethod update-instance-for-redefined-class ((object foo92b) added-slots discarded-slots property-list &rest initargs)
            (incf update-counter))
          (make-instances-obsolete 'foo92a)
          (slot-value x 's)
          update-counter))
      Expected: 1
      Got:      0
      
      [Taken from clisp's clos.tst]
      
      
      	* src/pcl/std-class.lisp (force-cache-flushes): Use new state
      	:obsolete if some superclass has been obsoleted.
      
      	* src/pcl/cache.lisp (check-wrapper-validity): If state is
      	:invalid, recurse because force-cache-flushes can change the
      	state.
      e5d1aeaf
  18. Jun 15, 2005
  19. Jun 14, 2005
    • rtoy's avatar
      From Gerd, cmucl-imp, 2005/06/11: · c231fb42
      rtoy authored
          This week's fix is for something Lynn Quam reported 2004-10-18.
      
          (defclass a (b) ())
      
          (compile nil
      	     (lambda ()
      	       (defclass b ()
      		 ((x :reader b-x)))
      	       (defmethod f ((obj b))
      		 (b-x obj))))
            => error during macro expansion
      
          The fix is:
      
      	    * src/pcl/method-slot-access-optimization.lisp (check-inline-accessor-call-p):
      	    Return nil for forward-referenced classes.
      
      	    * src/pcl/info.lisp (decide-slot-type): Return nil for
      	    forward-referenced classes.
      c231fb42
  20. Jun 06, 2005
    • rtoy's avatar
      Fix CALL-METHOD used outside of emf from. · 0634baa7
      rtoy authored
      Fix from Gerd, cmucl-imp, 2005-06-04 for the following test:
      
          (define-method-combination mc ()
            ((primary () :required t))
            `(restart-case (call-method ,(first primary))
      	 ()))
      
          (defgeneric foo ()
            (:method-combination mc)
            (:method () nil))
      
          (foo)
      
          It turns out this is caused by RESTART-CASE macroexpanding its case
          expression, which it does to see if it starts with ERROR or similar.
          An ANSI thing, if I remember correctly.
      0634baa7
  21. May 31, 2005
    • rtoy's avatar
      Fix for compute-slots, from Gerd, cmucl-imp, 2005-05-28. The test · f3bad3ed
      rtoy authored
      case reported by Bruno is:
      
      #+CMU (use-package "PCL")
      (defclass b (a) ())
      (defmethod compute-slots ((class (eql (find-class 'b))))
        (append (call-next-method)
                (list (make-instance 'standard-effective-slot-definition
                        :name 'y
                        :allocation :instance))))
      (defclass a () ((x :allocation :class)))
      ;; A should now have a shared slot, X, and a local slot, Y.
      (mapcar #'slot-definition-location (class-slots (find-class 'b)))
      
      Instead of an error about no matching method, we get
      
      ((X . PCL::..SLOT-UNBOUND..) 0)
      f3bad3ed
  22. May 23, 2005
    • rtoy's avatar
      Patch from Gerd Moellmann, cmucl-imp, 2005-05-21: · 9976492d
      rtoy authored
          ;; Shared slot becomes local.
          ;; 4.3.6.1.: "The value of a slot that is specified as shared in the old class
          ;;            and as local in the new class is retained."
          (multiple-value-bind (value condition)
      	(ignore-errors
      	  (defclass foo85a () ((size :initarg :size :initform 1 :allocation :class)))
      	  (defclass foo85b (foo85a) ())
      	  (setq i (make-instance 'foo85b))
      	  (defclass foo85a () ((size :initarg :size :initform 2) (other)))
      	  (slot-value i 'size))
            (list value (type-of condition)))
          Expected: (1 NULL)
      9976492d
    • rtoy's avatar
      Patch from Gerd Moellmann, cmucl-imp, 2005-05-21: · 4bbc6932
      rtoy authored
          This is also for something Bruno reported:
      
          The MOP p. 47 says about ensure-class-using-class:
             "The :metaclass argument is a class metaobject class or a class
      	metaobject class name."
          However, CMUCL 19a does not support passing a class here.
      4bbc6932
  23. May 16, 2005
    • rtoy's avatar
      From Gerd Moellman, cmucl-imp, 2005-05-15: · 5f1fcac9
      rtoy authored
          This is another small fix for a problem Bruno reported:
      
          ;; 3.4.10 Define-method-combination Arguments Lambda Lists
          (progn
            (define-method-combination w-args ()
      	((method-list *))
      	(:arguments arg1 arg2 &aux (extra :extra))
      	`(progn , <at> (mapcar #'(lambda (method) `(call-method ,method))
          method-list)))
            (defgeneric mc-test-w-args (p1 p2 s)
      	(:method-combination w-args)
      	(:method ((p1 number) (p2 t) s)
      	  (vector-push-extend (list 'number p1 p2) s))
      	(:method ((p1 string) (p2 t) s)
      	  (vector-push-extend (list 'string p1 p2) s))
      	(:method ((p1 t) (p2 t) s) (vector-push-extend (list t p1 p2) s)))
            (let ((s (make-array 10 :adjustable t :fill-pointer 0)))
      	(mc-test-w-args 1 2 s)
      	s))
          Expected: #((NUMBER 1 2) (T 1 2))
          Got:      ERROR: Lambda-variable is not a symbol: (EXTRA :EXTRA).
      5f1fcac9
  24. Jan 27, 2005
  25. Dec 06, 2004
  26. Oct 05, 2004
  27. Sep 25, 2004
  28. Aug 06, 2004
  29. Jul 11, 2004
  30. Jul 10, 2004
  31. Jul 09, 2004
  32. Apr 14, 2004
  33. Apr 06, 2004
    • rtoy's avatar
      Add support for source location recording, from Helmut Eller on · f4f6325e
      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.)
      f4f6325e
  34. Apr 02, 2004
Loading