Changeset 12954


Ignore:
Timestamp:
10/07/10 22:35:50 (13 years ago)
Author:
ehuelsmann
Message:

Replace unsynchronized data types with concurrency-supporting
synchronized data types from the java.util.concurrent package
in CLOS supporting code.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/abcl/src/org/armedbear/lisp/StandardGenericFunction.java

    r12898 r12954  
    3636import static org.armedbear.lisp.Lisp.*;
    3737
    38 import java.util.HashMap;
     38import java.util.concurrent.ConcurrentHashMap;
    3939
    4040public final class StandardGenericFunction extends StandardObject
     
    4444  int numberOfRequiredArgs;
    4545
    46   HashMap<CacheEntry,LispObject> cache;
    47   HashMap<LispObject,LispObject> slotCache;
     46  ConcurrentHashMap<CacheEntry,LispObject> cache;
     47  ConcurrentHashMap<LispObject,LispObject> slotCache;
    4848
    4949  public StandardGenericFunction()
     
    582582          }
    583583        CacheEntry specializations = new CacheEntry(array);
    584         HashMap<CacheEntry,LispObject> ht = gf.cache;
     584        ConcurrentHashMap<CacheEntry,LispObject> ht = gf.cache;
    585585        if (ht == null)
    586             ht = gf.cache = new HashMap<CacheEntry,LispObject>();
     586            ht = gf.cache = new ConcurrentHashMap<CacheEntry,LispObject>();
    587587        ht.put(specializations, third);
    588588        return third;
     
    607607          }
    608608        CacheEntry specializations = new CacheEntry(array);
    609         HashMap<CacheEntry,LispObject> ht = gf.cache;
     609        ConcurrentHashMap<CacheEntry,LispObject> ht = gf.cache;
    610610        if (ht == null)
    611611          return NIL;
     
    706706        LispObject layout = second;
    707707        LispObject location = third;
    708         HashMap<LispObject,LispObject> ht = gf.slotCache;
     708        ConcurrentHashMap<LispObject,LispObject> ht = gf.slotCache;
    709709        if (ht == null)
    710           ht = gf.slotCache = new HashMap<LispObject,LispObject>();
     710          ht = gf.slotCache = new ConcurrentHashMap<LispObject,LispObject>();
    711711        ht.put(layout, location);
    712712        return third;
     
    724724        final StandardGenericFunction gf = checkStandardGenericFunction(first);
    725725        LispObject layout = second;
    726         HashMap<LispObject,LispObject> ht = gf.slotCache;
     726        ConcurrentHashMap<LispObject,LispObject> ht = gf.slotCache;
    727727        if (ht == null)
    728728          return NIL;
Note: See TracChangeset for help on using the changeset viewer.