Changeset 4345


Ignore:
Timestamp:
10/13/03 13:10:03 (18 years ago)
Author:
piso
Message:

FUNCALL: recognize generic functions.

File:
1 edited

Legend:

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

    r4340 r4345  
    33 *
    44 * Copyright (C) 2002-2003 Peter Graves
    5  * $Id: Primitives.java,v 1.472 2003-10-13 11:40:12 piso Exp $
     5 * $Id: Primitives.java,v 1.473 2003-10-13 13:10:03 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    20872087            else
    20882088                fun = arg;
    2089             if (fun instanceof Function)
     2089            if (fun instanceof Function || fun instanceof GenericFunction)
    20902090                return funcall0(fun, LispThread.currentThread());
    20912091            throw new ConditionThrowable(new UndefinedFunction(arg));
     
    20992099            else
    21002100                fun = first;
    2101             if (fun instanceof Function)
     2101            if (fun instanceof Function || fun instanceof GenericFunction)
    21022102                return funcall1(fun, second, LispThread.currentThread());
    21032103            throw new ConditionThrowable(new UndefinedFunction(first));
     
    21122112            else
    21132113                fun = first;
    2114             if (fun instanceof Function)
     2114            if (fun instanceof Function || fun instanceof GenericFunction)
    21152115                return funcall2(fun, second, third, LispThread.currentThread());
    21162116            throw new ConditionThrowable(new UndefinedFunction(first));
     
    21252125            else
    21262126                fun = args[0];
    2127             if (fun instanceof Function) {
     2127            if (fun instanceof Function || fun instanceof GenericFunction) {
    21282128                final int length = args.length - 1; // Number of arguments.
    21292129                if (length == 3) {
Note: See TracChangeset for help on using the changeset viewer.