Changeset 5881


Ignore:
Timestamp:
02/19/04 18:29:42 (17 years ago)
Author:
piso
Message:

Work in progress: STD-COMPUTE-DISCRIMINATING-FUNCTION.

File:
1 edited

Legend:

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

    r5880 r5881  
    22;;;
    33;;; Copyright (C) 2003-2004 Peter Graves
    4 ;;; $Id: clos.lisp,v 1.89 2004-02-19 18:17:51 piso Exp $
     4;;; $Id: clos.lisp,v 1.90 2004-02-19 18:29:42 piso Exp $
    55;;;
    66;;; This program is free software; you can redistribute it and/or
     
    12871287                              (slow-method-lookup ,gf args nil))
    12881288                           nil)
    1289              (let ((emf-table (classes-to-emf-table gf)))
     1289             (let ((emf-table (classes-to-emf-table gf))
     1290                   (number-required (length (gf-required-args gf))))
    12901291               (make-closure
    12911292                `(lambda (&rest args)
    1292                    (let* ((classes (mapcar #'class-of (required-portion ,gf args)))
     1293                   (when (< (length args) ,number-required)
     1294                     (error 'program-error
     1295                            :format-control "Not enough arguments for generic function ~S."
     1296                            :format-arguments (list ,gf)))
     1297                   (let* ((classes (mapcar #'class-of (subseq args 0 ,number-required)))
    12931298                          (emfun (gethash classes ,emf-table)))
    12941299                     (if emfun
Note: See TracChangeset for help on using the changeset viewer.