Changeset 274


Ignore:
Timestamp:
Jan 13, 2004, 4:50:52 PM (21 years ago)
Author:
Gary Byers
Message:

DEFCLASS: allow NIL as slot :type, expand into (new)
ENSURE-CLASS-FOR-DEFCLASS. Signal a PROGRAM-ERROR in
DEFINE-METHOD-COMBINATION. Can't have a macro named CL:METHOD, so
change its name to CCL::REFERENCE-METHOD for the time being.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ccl/lib/macros.lisp

    r144 r274  
    16261626                        (duplicate-options slot)
    16271627                        (setq type-p t))
    1628                       (when (null (cadr options)) (signal-program-error "Illegal options ~S" options))
     1628                      ;(when (null (cadr options)) (signal-program-error "Illegal options ~S" options))
    16291629                      (setq type (cadr options)))
    16301630                     (:initform
     
    16721672                ,@(mapcar #'(lambda (s) `(note-function-info ',s nil ,env))
    16731673                          signatures)))
    1674             (progn
    1675               (record-source-file ',class-name 'class)
    1676               (ensure-class ',class-name
     1674              (ensure-class-for-defclass ',class-name
    16771675                            :direct-superclasses ',direct-superclasses
    16781676                            :direct-slots ,`(list ,@direct-slot-specs)
    1679                             ,@other-options))))))))
     1677                            ,@other-options)))))))
    16801678
    16811679(defmacro define-method-combination (name &rest rest &environment env)
     
    17111709        options methods option-keywords method-class)
    17121710    (flet ((bad-option (o)
    1713              (error "Bad option: ~s to ~s." o 'defgeneric)))
     1711             (signal-program-error "Bad option: ~s to ~s." o 'defgeneric)))
    17141712      (dolist (o options-and-methods)
    17151713        (let ((keyword (car o))
     
    17181716            (push `(,defmethod ,function-name ,@(%cdr o)) methods)
    17191717            (cond ((memq keyword (prog1 option-keywords (push keyword option-keywords)))
    1720                    (error "Duplicate option: ~s to ~s" keyword 'defgeneric))
     1718                   (signal-program-error "Duplicate option: ~s to ~s" keyword 'defgeneric))
    17211719                  ((eq keyword :method-name)    ; used by generic-flet
    17221720                   (if function-name (bad-option o))
     
    24412439
    24422440; I wanted to call this ":method"
    2443 (defmacro method (gf &rest qualifiers-and-specializers)
     2441(defmacro reference-method (gf &rest qualifiers-and-specializers)
    24442442  (let ((qualifiers (butlast qualifiers-and-specializers))
    24452443        (specializers (car (last qualifiers-and-specializers))))
Note: See TracChangeset for help on using the changeset viewer.