Changeset 14033


Ignore:
Timestamp:
07/31/12 18:10:03 (9 years ago)
Author:
ehuelsmann
Message:

Make MACROEXPAND-1 auto-load strictly what it needs (macro functions)
instead of auto-loading all function types.

File:
1 edited

Legend:

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

    r14002 r14033  
    224224          {
    225225            LispObject obj = env.lookupFunction(car);
    226             if (obj instanceof Autoload)
     226            if (obj instanceof AutoloadMacro)
    227227              {
     228                // Don't autoload function objects here:
     229                // we want that to happen upon the first use.
     230                // in case of macro functions, this *is* the first use.
    228231                Autoload autoload = (Autoload) obj;
    229232                autoload.load();
     
    18091812    else if (obj instanceof Cons && obj.car() == Symbol.LAMBDA)
    18101813      return new Closure(obj, new Environment());
     1814    if (obj instanceof Cons && obj.car() == Symbol.NAMED_LAMBDA) {
     1815        LispObject name = obj.cadr();
     1816        if (name instanceof Symbol || isValidSetfFunctionName(name)) {
     1817            return new Closure(name,
     1818                               new Cons(Symbol.LAMBDA, obj.cddr()),
     1819                               new Environment());
     1820        }
     1821        return type_error(name, FUNCTION_NAME);
     1822    }
    18111823    error(new UndefinedFunction(obj));
    18121824    // Not reached.
Note: See TracChangeset for help on using the changeset viewer.