Changeset 14012


Ignore:
Timestamp:
07/19/12 19:41:41 (8 years ago)
Author:
rschlatte
Message:

Enable usage of method combinations with options

  • e.g., (defgeneric foo (x) (:method-combination and :most-specific-last))
Location:
trunk/abcl/src/org/armedbear/lisp
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/abcl/src/org/armedbear/lisp/clos.lisp

    r14010 r14012  
    902902
    903903(define-primordial-class method-combination (metaobject)
    904   ((sys::name :initform nil)
     904  ((sys::name :initarg :name :initform nil)
    905905   (sys::%documentation :initarg :documentation :initform nil)
    906906   (options :initarg :options :initform nil)))
    907907
    908908(define-primordial-class short-method-combination (method-combination)
    909   (operator
    910    identity-with-one-argument))
     909  ((operator :initarg :operator)
     910   (identity-with-one-argument :initarg :identity-with-one-argument)))
    911911
    912912(define-primordial-class long-method-combination (method-combination)
    913   (sys::lambda-list
    914    method-group-specs
    915    args-lambda-list
    916    generic-function-symbol
    917    function
    918    arguments
    919    declarations
    920    forms))
     913  ((sys::lambda-list :initarg :lambda-list)
     914   (method-group-specs :initarg :method-group-specs)
     915   (args-lambda-list :initarg :args-lambda-list)
     916   (generic-function-symbol :initarg :generic-function-symbol)
     917   (function :initarg :function)
     918   (arguments :initarg :arguments)
     919   (declarations :initarg :declarations)
     920   (forms :initarg :forms)))
    921921
    922922(define-primordial-class standard-accessor-method (standard-method)
     
    10341034          (getf (cddr whole) :operator name)))
    10351035    `(progn
    1036        ;; Class short-method-combination is defined in StandardClass.java.
    10371036       (let ((instance (std-allocate-instance
    10381037                        (find-class 'short-method-combination))))
  • trunk/abcl/src/org/armedbear/lisp/print-object.lisp

    r14011 r14012  
    8080  (print-unreadable-object (method-combination stream :identity t)
    8181    (format stream "~A ~S" (class-name (class-of method-combination))
    82             (mop::method-combination-name method-combination)))
     82            (ignore-errors (mop::method-combination-name method-combination))))
    8383  method-combination)
    8484
Note: See TracChangeset for help on using the changeset viewer.