[armedbear-cvs] r12710 - trunk/abcl/src/org/armedbear/lisp
Erik Huelsmann
ehuelsmann at common-lisp.net
Wed May 19 22:27:22 UTC 2010
Author: ehuelsmann
Date: Wed May 19 18:27:21 2010
New Revision: 12710
Log:
Move access to uninterned symbols array to Load.java for
future use by the compiler.
Modified:
trunk/abcl/src/org/armedbear/lisp/FaslReader.java
trunk/abcl/src/org/armedbear/lisp/Load.java
Modified: trunk/abcl/src/org/armedbear/lisp/FaslReader.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/FaslReader.java (original)
+++ trunk/abcl/src/org/armedbear/lisp/FaslReader.java Wed May 19 18:27:21 2010
@@ -286,26 +286,7 @@
@Override
public LispObject execute(Stream stream, char c, int n)
{
- LispThread thread = LispThread.currentThread();
- LispObject uninternedSymbols =
- Load._FASL_UNINTERNED_SYMBOLS_.symbolValue(thread);
-
- if (! (uninternedSymbols instanceof Cons)) // it must be a vector
- return uninternedSymbols.AREF(n);
-
- // During normal loading, we won't get to this bit, however,
- // with eval-when processing, we may need to fall back to
- // *FASL-UNINTERNED-SYMBOLS* being an alist structure
- LispObject label = LispInteger.getInstance(n);
- while (uninternedSymbols != NIL)
- {
- LispObject item = uninternedSymbols.car();
- if (label.eql(item.cdr()))
- return item.car();
-
- uninternedSymbols = uninternedSymbols.cdr();
- }
- return error(new LispError("No entry for uninterned symbol."));
+ return Load.getUninternedSymbol(n);
}
};
Modified: trunk/abcl/src/org/armedbear/lisp/Load.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/Load.java (original)
+++ trunk/abcl/src/org/armedbear/lisp/Load.java Wed May 19 18:27:21 2010
@@ -380,6 +380,31 @@
public static final Symbol _FASL_UNINTERNED_SYMBOLS_ =
internSpecial("*FASL-UNINTERNED-SYMBOLS*", PACKAGE_SYS, NIL);
+ // Function to access the uninterned symbols "array"
+ public final static LispObject getUninternedSymbol(int n) {
+ LispThread thread = LispThread.currentThread();
+ LispObject uninternedSymbols =
+ Load._FASL_UNINTERNED_SYMBOLS_.symbolValue(thread);
+
+ if (! (uninternedSymbols instanceof Cons)) // it must be a vector
+ return uninternedSymbols.AREF(n);
+
+ // During normal loading, we won't get to this bit, however,
+ // with eval-when processing, we may need to fall back to
+ // *FASL-UNINTERNED-SYMBOLS* being an alist structure
+ LispObject label = LispInteger.getInstance(n);
+ while (uninternedSymbols != NIL)
+ {
+ LispObject item = uninternedSymbols.car();
+ if (label.eql(item.cdr()))
+ return item.car();
+
+ uninternedSymbols = uninternedSymbols.cdr();
+ }
+ return error(new LispError("No entry for uninterned symbol."));
+ }
+
+
// ### init-fasl &key version
private static final Primitive INIT_FASL = new init_fasl();
private static class init_fasl extends Primitive {
More information about the armedbear-cvs
mailing list