[armedbear-cvs] r14370 - branches/1.1.x/src/org/armedbear/lisp
mevenson at common-lisp.net
mevenson at common-lisp.net
Wed Feb 13 19:24:41 UTC 2013
Author: mevenson
Date: Wed Feb 13 11:24:39 2013
New Revision: 14370
Log:
Backport r14359 | mevenson | 2013-01-17 12:15:14 +0100 (Thu, 17 Jan 2013) | 1 line
Refactor autoload functions to naming conventions.
Modified:
branches/1.1.x/src/org/armedbear/lisp/Autoload.java
Modified: branches/1.1.x/src/org/armedbear/lisp/Autoload.java
==============================================================================
--- branches/1.1.x/src/org/armedbear/lisp/Autoload.java Wed Feb 13 11:01:20 2013 (r14369)
+++ branches/1.1.x/src/org/armedbear/lisp/Autoload.java Wed Feb 13 11:24:39 2013 (r14370)
@@ -98,7 +98,6 @@
"org.armedbear.lisp.".concat(className)));
}
-
private static void effectiveLoad(String className, String fileName) {
if (className != null) {
try {
@@ -276,10 +275,14 @@
return unreadableString(sb.toString());
}
- // ### autoload
- private static final Primitive AUTOLOAD =
- new Primitive("autoload", PACKAGE_EXT, true)
- {
+ public static final Primitive AUTOLOAD = new pf_autoload();
+ @DocString(name="autoload",
+ args="symbol-or-symbols filename",
+ doc="Setup the autoload for SYMBOL-OR-SYMBOLS optionally corresponding to FILENAME.")
+ private static final class pf_autoload extends Primitive {
+ pf_autoload() {
+ super("autoload", PACKAGE_EXT, true);
+ }
@Override
public LispObject execute(LispObject first)
{
@@ -318,14 +321,16 @@
}
};
- // ### resolve
- // Force autoload to be resolved.
- private static final Primitive RESOLVE =
- new Primitive("resolve", PACKAGE_EXT, true, "symbol")
- {
+ public static final Primitive RESOLVE = new pf_resolve();
+ @DocString(name="resolve",
+ args="symbol",
+ doc="Force the symbol to be resolved via the autoloader mechanism.")
+ private static final class pf_resolve extends Primitive {
+ pf_resolve() {
+ super("resolve", PACKAGE_EXT, true, "symbol");
+ }
@Override
- public LispObject execute(LispObject arg)
- {
+ public LispObject execute(LispObject arg) {
Symbol symbol = checkSymbol(arg);
LispObject fun = symbol.getSymbolFunction();
if (fun instanceof Autoload) {
@@ -335,12 +340,17 @@
}
return fun;
}
- };
+ }
- // ### autoloadp
- private static final Primitive AUTOLOADP =
- new Primitive("autoloadp", PACKAGE_EXT, true, "symbol")
- {
+ public static final Primitive AUTOLOADP = new pf_autoloadp();
+ @DocString(name="autoloadp",
+ args="symbol",
+ doc="Boolean predicate for whether SYMBOL stands for a function that currently needs to be autoloaded.")
+ private static final class pf_autoloadp extends Primitive {
+ pf_autoloadp() {
+ super("autoloadp", PACKAGE_EXT, true, "symbol");
+ }
+
@Override
public LispObject execute(LispObject arg)
{
More information about the armedbear-cvs
mailing list