Changeset 5699


Ignore:
Timestamp:
02/05/04 01:14:39 (17 years ago)
Author:
piso
Message:

Work in progress.

File:
1 edited

Legend:

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

    r5698 r5699  
    22;;;
    33;;; Copyright (C) 2003-2004 Peter Graves
    4 ;;; $Id: clos.lisp,v 1.62 2004-02-05 00:58:38 piso Exp $
     4;;; $Id: clos.lisp,v 1.63 2004-02-05 01:14:39 piso Exp $
    55;;;
    66;;; This program is free software; you can redistribute it and/or
     
    590590(defmacro defclass (&whole form name direct-superclasses direct-slots &rest options)
    591591  (unless (>= (length form) 3)
    592     (error 'program-error "wrong number of arguments for DEFCLASS"))
     592    (error 'program-error "Wrong number of arguments for DEFCLASS."))
    593593  `(ensure-class ',name
    594594                 :direct-superclasses
     
    597597                 ,(canonicalize-direct-slots direct-slots)
    598598                 ,@(canonicalize-defclass-options options)))
    599 
    600 ;; The method-combination slot of a standard generic function contains either
    601 ;; the name of the method combination type or a list whose car is the name of
    602 ;; the method combination type and whose cdr is a list of options (for example
    603 ;; :MOST-SPECIFIC-FIRST or :MOST-SPECIFIC-LAST).
    604 
    605 (defun method-combination-name (method-combination)
    606   (if (atom method-combination)
    607       method-combination
    608       (car method-combination)))
    609 
    610 (defun method-combination-options (method-combination)
    611   (if (atom method-combination)
    612       nil
    613       (cdr method-combination)))
    614599
    615600(defclass standard-generic-function (generic-function)
     
    620605   (method-class              ; :accessor generic-function-method-class
    621606    :initarg :method-class)
     607   ;; The method-combination slot contains either the name of the method
     608   ;; combination type or a list whose car is the name of the method
     609   ;; combination type and whose cdr is a list of options.
    622610   (method-combination
    623611    :initarg :method-combination)
     
    12001188(defun std-compute-effective-method-function (gf methods)
    12011189  (let* ((mc (generic-function-method-combination gf))
    1202          (mc-name (method-combination-name mc))
    1203          (options (method-combination-options mc))
     1190         (mc-name (if (atom mc) mc (car mc)))
     1191         (options (if (atom mc) () (cdr mc)))
    12041192         (order (car options))
    12051193         (primaries ())
Note: See TracChangeset for help on using the changeset viewer.