[armedbear-cvs] r12977 - trunk/abcl/src/org/armedbear/lisp
Erik Huelsmann
ehuelsmann at common-lisp.net
Sun Oct 17 15:22:42 UTC 2010
Author: ehuelsmann
Date: Sun Oct 17 11:22:41 2010
New Revision: 12977
Log:
Unintern symbols with a deleted package as their
home package. This is what SBCL does too and fixes
current ANSI tests breakage.
Modified:
trunk/abcl/src/org/armedbear/lisp/Package.java
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 Sun Oct 17 11:22:41 2010
@@ -49,8 +49,13 @@
private transient LispObject propertyList;
+ /** Symbols internal to the package. */
private transient final ConcurrentHashMap<String, Symbol> internalSymbols
= new ConcurrentHashMap<String, Symbol>(16);
+ /** Symbols exported from the package.
+ *
+ * Those symbols in this collection are not contained in the internalSymbols
+ */
private transient final ConcurrentHashMap<String, Symbol> externalSymbols
= new ConcurrentHashMap<String, Symbol>(16);
@@ -141,12 +146,25 @@
return nicknames;
}
+ private void makeSymbolsUninterned(ConcurrentHashMap symbolMap) {
+ Symbol sym;
+ for (Iterator<Symbol> it = symbolMap.values().iterator();
+ it.hasNext();) {
+ sym = it.next();
+ if (sym.getPackage() == this) {
+ sym.setPackage(NIL);
+ }
+ }
+ symbolMap.clear();
+ }
+
public final synchronized boolean delete()
{
if (name != null) {
Packages.deletePackage(this);
- internalSymbols.clear();
- externalSymbols.clear();
+
+ makeSymbolsUninterned(internalSymbols);
+ makeSymbolsUninterned(externalSymbols); // also clears externalSymbols
name = null;
lispName = null;
More information about the armedbear-cvs
mailing list