Changeset 14359


Ignore:
Timestamp:
01/17/13 11:15:14 (11 years ago)
Author:
Mark Evenson
Message:

Refactor autoload functions to naming conventions.

File:
1 edited

Legend:

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

    r14113 r14359  
    9999    }
    100100
    101 
    102101    private static void effectiveLoad(String className, String fileName) {
    103102        if (className != null) {
     
    277276    }
    278277
    279     // ### autoload
    280     private static final Primitive AUTOLOAD =
    281         new Primitive("autoload", PACKAGE_EXT, true)
    282     {
     278    public static final Primitive AUTOLOAD = new pf_autoload();
     279    @DocString(name="autoload",
     280               args="symbol-or-symbols filename",
     281               doc="Setup the autoload for SYMBOL-OR-SYMBOLS optionally corresponding to FILENAME.")
     282    private static final class pf_autoload extends Primitive {
     283        pf_autoload() {   
     284            super("autoload", PACKAGE_EXT, true);
     285        }
    283286        @Override
    284287        public LispObject execute(LispObject first)
     
    319322    };
    320323
    321     // ### resolve
    322     // Force autoload to be resolved.
    323     private static final Primitive RESOLVE =
    324         new Primitive("resolve", PACKAGE_EXT, true, "symbol")
    325     {
     324    public static final Primitive RESOLVE = new pf_resolve();
     325    @DocString(name="resolve",
     326               args="symbol",
     327               doc="Force the symbol to be resolved via the autoloader mechanism.")
     328    private static final class pf_resolve extends Primitive {
     329        pf_resolve() {
     330            super("resolve", PACKAGE_EXT, true, "symbol");
     331        }
    326332        @Override
    327         public LispObject execute(LispObject arg)
    328         {
     333        public LispObject execute(LispObject arg) {
    329334            Symbol symbol = checkSymbol(arg);
    330335            LispObject fun = symbol.getSymbolFunction();
     
    336341            return fun;
    337342        }
    338     };
    339 
    340     // ### autoloadp
    341     private static final Primitive AUTOLOADP =
    342         new Primitive("autoloadp", PACKAGE_EXT, true, "symbol")
    343     {
     343    }
     344
     345    public static final Primitive AUTOLOADP = new pf_autoloadp();
     346    @DocString(name="autoloadp",
     347               args="symbol",
     348               doc="Boolean predicate for whether SYMBOL stands for a function that currently needs to be autoloaded.")
     349    private static final class pf_autoloadp extends Primitive {
     350        pf_autoloadp() {
     351            super("autoloadp", PACKAGE_EXT, true, "symbol");
     352        }
     353                   
    344354        @Override
    345355        public LispObject execute(LispObject arg)
Note: See TracChangeset for help on using the changeset viewer.