[armedbear-cvs] r12946 - in trunk/abcl: src/org/armedbear/lisp test/lisp/ansi

Ville Voutilainen vvoutilainen at common-lisp.net
Sun Oct 3 21:33:36 UTC 2010


Author: vvoutilainen
Date: Sun Oct  3 17:33:34 2010
New Revision: 12946

Log:
Thread-safety fix for CLOS. Finding the problem and
the patch by David Kirkman, kudos for the hard work.

I merely added fixes for the other hashtables according to
David's patch, and fixed the ansi error parsing,
reported again by David. MASSIVE thanks for the patch!


Modified:
   trunk/abcl/src/org/armedbear/lisp/EqHashTable.java
   trunk/abcl/src/org/armedbear/lisp/EqlHashTable.java
   trunk/abcl/src/org/armedbear/lisp/EqualHashTable.java
   trunk/abcl/src/org/armedbear/lisp/EqualpHashTable.java
   trunk/abcl/test/lisp/ansi/parse-ansi-errors.lisp

Modified: trunk/abcl/src/org/armedbear/lisp/EqHashTable.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/EqHashTable.java	(original)
+++ trunk/abcl/src/org/armedbear/lisp/EqHashTable.java	Sun Oct  3 17:33:34 2010
@@ -54,7 +54,7 @@
     }
 
     @Override
-    public LispObject get(LispObject key)
+    public synchronized LispObject get(LispObject key)
     {
         final int index;
         if (key == cachedKey) {
@@ -74,7 +74,7 @@
     }
 
     @Override
-    public void put(LispObject key, LispObject value)
+    public synchronized void put(LispObject key, LispObject value)
     {
         int index;
         if (key == cachedKey) {

Modified: trunk/abcl/src/org/armedbear/lisp/EqlHashTable.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/EqlHashTable.java	(original)
+++ trunk/abcl/src/org/armedbear/lisp/EqlHashTable.java	Sun Oct  3 17:33:34 2010
@@ -55,7 +55,7 @@
   }
 
   @Override
-  public LispObject get(LispObject key)
+  public synchronized LispObject get(LispObject key)
   {
     HashEntry e = buckets[key.sxhash() & mask];
     while (e != null)
@@ -68,7 +68,7 @@
   }
 
   @Override
-  public void put(LispObject key, LispObject value)
+  public synchronized void put(LispObject key, LispObject value)
   {
     int index = key.sxhash() & mask;
     HashEntry e = buckets[index];

Modified: trunk/abcl/src/org/armedbear/lisp/EqualHashTable.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/EqualHashTable.java	(original)
+++ trunk/abcl/src/org/armedbear/lisp/EqualHashTable.java	Sun Oct  3 17:33:34 2010
@@ -51,7 +51,7 @@
   }
 
   @Override
-  public LispObject get(LispObject key)
+  public synchronized LispObject get(LispObject key)
   {
     HashEntry e = buckets[key.sxhash() & mask];
     while (e != null)
@@ -64,7 +64,7 @@
   }
 
   @Override
-  public void put(LispObject key, LispObject value)
+  public synchronized void put(LispObject key, LispObject value)
   {
     int index = key.sxhash() & mask;
     HashEntry e = buckets[index];

Modified: trunk/abcl/src/org/armedbear/lisp/EqualpHashTable.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/EqualpHashTable.java	(original)
+++ trunk/abcl/src/org/armedbear/lisp/EqualpHashTable.java	Sun Oct  3 17:33:34 2010
@@ -48,7 +48,7 @@
   }
 
   @Override
-  public LispObject get(LispObject key)
+  public synchronized LispObject get(LispObject key)
   {
     final int index = key.psxhash() % buckets.length;
     HashEntry e = buckets[index];
@@ -62,7 +62,7 @@
   }
 
   @Override
-  public void put(LispObject key, LispObject value)
+  public synchronized void put(LispObject key, LispObject value)
   {
     int index = key.psxhash() % buckets.length;
     HashEntry e = buckets[index];

Modified: trunk/abcl/test/lisp/ansi/parse-ansi-errors.lisp
==============================================================================
--- trunk/abcl/test/lisp/ansi/parse-ansi-errors.lisp	(original)
+++ trunk/abcl/test/lisp/ansi/parse-ansi-errors.lisp	Sun Oct  3 17:33:34 2010
@@ -76,7 +76,7 @@
 (defvar *default-database-file* 
   (if (find :asdf2 *features*)
       (asdf:system-relative-pathname :ansi-compiled "test/lisp/ansi/ansi-test-failures")
-      (merge-pathnames "ansi-test-failures" (directory-namestring *load-truename*)))
+      (merge-pathnames "ansi-test-failures" (directory-namestring *load-truename*))))
 
 (defun parse (&optional (file *default-database-file*))
   (format t "Parsing test report database from ~A~%" *default-database-file*)




More information about the armedbear-cvs mailing list