[armedbear-cvs] r12954 - trunk/abcl/src/org/armedbear/lisp
Erik Huelsmann
ehuelsmann at common-lisp.net
Thu Oct 7 22:35:52 UTC 2010
Author: ehuelsmann
Date: Thu Oct 7 18:35:50 2010
New Revision: 12954
Log:
Replace unsynchronized data types with concurrency-supporting
synchronized data types from the java.util.concurrent package
in CLOS supporting code.
Modified:
trunk/abcl/src/org/armedbear/lisp/StandardGenericFunction.java
Modified: trunk/abcl/src/org/armedbear/lisp/StandardGenericFunction.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/StandardGenericFunction.java (original)
+++ trunk/abcl/src/org/armedbear/lisp/StandardGenericFunction.java Thu Oct 7 18:35:50 2010
@@ -35,7 +35,7 @@
import static org.armedbear.lisp.Lisp.*;
-import java.util.HashMap;
+import java.util.concurrent.ConcurrentHashMap;
public final class StandardGenericFunction extends StandardObject
{
@@ -43,8 +43,8 @@
int numberOfRequiredArgs;
- HashMap<CacheEntry,LispObject> cache;
- HashMap<LispObject,LispObject> slotCache;
+ ConcurrentHashMap<CacheEntry,LispObject> cache;
+ ConcurrentHashMap<LispObject,LispObject> slotCache;
public StandardGenericFunction()
{
@@ -581,9 +581,9 @@
args = args.cdr();
}
CacheEntry specializations = new CacheEntry(array);
- HashMap<CacheEntry,LispObject> ht = gf.cache;
+ ConcurrentHashMap<CacheEntry,LispObject> ht = gf.cache;
if (ht == null)
- ht = gf.cache = new HashMap<CacheEntry,LispObject>();
+ ht = gf.cache = new ConcurrentHashMap<CacheEntry,LispObject>();
ht.put(specializations, third);
return third;
}
@@ -606,7 +606,7 @@
args = args.cdr();
}
CacheEntry specializations = new CacheEntry(array);
- HashMap<CacheEntry,LispObject> ht = gf.cache;
+ ConcurrentHashMap<CacheEntry,LispObject> ht = gf.cache;
if (ht == null)
return NIL;
LispObject emf = (LispObject) ht.get(specializations);
@@ -705,9 +705,9 @@
final StandardGenericFunction gf = checkStandardGenericFunction(first);
LispObject layout = second;
LispObject location = third;
- HashMap<LispObject,LispObject> ht = gf.slotCache;
+ ConcurrentHashMap<LispObject,LispObject> ht = gf.slotCache;
if (ht == null)
- ht = gf.slotCache = new HashMap<LispObject,LispObject>();
+ ht = gf.slotCache = new ConcurrentHashMap<LispObject,LispObject>();
ht.put(layout, location);
return third;
}
@@ -723,7 +723,7 @@
{
final StandardGenericFunction gf = checkStandardGenericFunction(first);
LispObject layout = second;
- HashMap<LispObject,LispObject> ht = gf.slotCache;
+ ConcurrentHashMap<LispObject,LispObject> ht = gf.slotCache;
if (ht == null)
return NIL;
LispObject location = (LispObject) ht.get(layout);
More information about the armedbear-cvs
mailing list