Changeset 3810


Ignore:
Timestamp:
09/16/03 13:30:09 (20 years ago)
Author:
piso
Message:

Moved RESOLVE from Primitives.java to Autoload.java.

Location:
trunk/j/src/org/armedbear/lisp
Files:
2 edited

Legend:

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

    r3793 r3810  
    33 *
    44 * Copyright (C) 2003 Peter Graves
    5  * $Id: Autoload.java,v 1.63 2003-09-15 15:48:48 piso Exp $
     5 * $Id: Autoload.java,v 1.64 2003-09-16 13:30:09 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    116116
    117117    private static final Primitive AUTOLOAD =
    118         new Primitive("autoload", PACKAGE_SYS, true) {
     118        new Primitive("autoload", PACKAGE_SYS, true)
     119    {
    119120        public LispObject execute(LispObject first) throws LispError
    120121        {
     
    150151            }
    151152            throw new TypeError(first);
     153        }
     154    };
     155
     156    // ### resolve
     157    // Force autoload to be resolved.
     158    private static final Primitive1 RESOLVE =
     159        new Primitive1("resolve", PACKAGE_SYS, false)
     160    {
     161        public LispObject execute(LispObject arg) throws Condition
     162        {
     163            Symbol symbol = checkSymbol(arg);
     164            LispObject fun = symbol.getSymbolFunction();
     165            if (fun instanceof Autoload) {
     166                Autoload autoload = (Autoload) fun;
     167                autoload.load();
     168                return autoload.getSymbol().getSymbolFunction();
     169            }
     170            return fun;
    152171        }
    153172    };
  • trunk/j/src/org/armedbear/lisp/Primitives.java

    r3792 r3810  
    33 *
    44 * Copyright (C) 2002-2003 Peter Graves
    5  * $Id: Primitives.java,v 1.397 2003-09-15 15:02:06 piso Exp $
     5 * $Id: Primitives.java,v 1.398 2003-09-16 13:29:57 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    33703370    };
    33713371
    3372     // ### resolve
    3373     // Force autoload to be resolved.
    3374     private static final Primitive1 RESOLVE =
    3375         new Primitive1("resolve", PACKAGE_SYS, false) {
    3376         public LispObject execute(LispObject arg) throws Condition
    3377         {
    3378             Symbol symbol = checkSymbol(arg);
    3379             LispObject fun = symbol.getSymbolFunction();
    3380             if (fun instanceof Autoload) {
    3381                 Autoload autoload = (Autoload) fun;
    3382                 autoload.load();
    3383                 return autoload.getSymbol().getSymbolFunction();
    3384             }
    3385             return fun;
    3386         }
    3387     };
    3388 
    33893372    // ### setq
    33903373    private static final SpecialOperator SETQ = new SpecialOperator("setq") {
Note: See TracChangeset for help on using the changeset viewer.