[armedbear-cvs] r11491 - trunk/abcl/src/org/armedbear/lisp
Erik Huelsmann
ehuelsmann at common-lisp.net
Sat Dec 27 15:28:58 UTC 2008
Author: ehuelsmann
Date: Sat Dec 27 15:28:48 2008
New Revision: 11491
Log:
Cleanup: Add a way to add and initialize a special all at once.
Note: Even though this commit applies this principle only to CDR6,
a follow up commit should be created for this to be used in general.
Modified:
trunk/abcl/src/org/armedbear/lisp/Lisp.java
trunk/abcl/src/org/armedbear/lisp/Package.java
trunk/abcl/src/org/armedbear/lisp/Symbol.java
Modified: trunk/abcl/src/org/armedbear/lisp/Lisp.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/Lisp.java (original)
+++ trunk/abcl/src/org/armedbear/lisp/Lisp.java Sat Dec 27 15:28:48 2008
@@ -2529,11 +2529,6 @@
protected static boolean TRAP_UNDERFLOW = true;
- // Extentions
- static {
- Symbol._INSPECTOR_HOOK_.initializeSpecial(NIL);
- }
-
private static final void loadClass(String className)
{
try
Modified: trunk/abcl/src/org/armedbear/lisp/Package.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/Package.java (original)
+++ trunk/abcl/src/org/armedbear/lisp/Package.java Sat Dec 27 15:28:48 2008
@@ -299,6 +299,18 @@
return symbol;
}
+ /** Initializes the symbol as a special variables and assigns it
+ a value, just like DEFVAR would.
+ */
+ public synchronized Symbol addExternalSymbol(String symbolName,
+ LispObject specialValue)
+ {
+ final Symbol symbol = addExternalSymbol(symbolName);
+ symbol.initializeSpecial(specialValue);
+
+ return symbol;
+ }
+
public synchronized Symbol intern(String symbolName)
{
return intern(new SimpleString(symbolName));
Modified: trunk/abcl/src/org/armedbear/lisp/Symbol.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/Symbol.java (original)
+++ trunk/abcl/src/org/armedbear/lisp/Symbol.java Sat Dec 27 15:28:48 2008
@@ -3013,6 +3013,6 @@
// CDR6
public static final Symbol _INSPECTOR_HOOK_ =
- PACKAGE_EXT.addExternalSymbol("*INSPECTOR-HOOK*");
+ PACKAGE_EXT.addExternalSymbol("*INSPECTOR-HOOK*", NIL);
}
More information about the armedbear-cvs
mailing list