Changeset 12281
- Timestamp:
- 11/22/09 19:11:54 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/abcl/src/org/armedbear/lisp/LispObject.java
r12279 r12281 34 34 package org.armedbear.lisp; 35 35 36 import java.util.WeakHashMap; 37 36 38 public class LispObject extends Lisp 37 39 { … … 588 590 } 589 591 590 private static final EqHashTable documentationHashTable =591 new EqHashTable(11, NIL, NIL);592 private static final WeakHashMap<LispObject, LispObject> 593 documentationHashTable = new WeakHashMap<LispObject, LispObject>(); 592 594 593 595 public LispObject getDocumentation(LispObject docType) 594 596 595 597 { 596 LispObject alist = documentationHashTable.get(this); 598 LispObject alist; 599 synchronized (documentationHashTable) { 600 alist = documentationHashTable.get(this); 601 } 597 602 if (alist != null) 598 603 { … … 607 612 608 613 { 609 LispObject alist = documentationHashTable.get(this); 610 if (alist == null) 611 alist = NIL; 612 LispObject entry = assq(docType, alist); 613 if (entry instanceof Cons) 614 { 615 ((Cons)entry).cdr = documentation; 616 } 617 else 618 { 619 alist = alist.push(new Cons(docType, documentation)); 620 documentationHashTable.put(this, alist); 621 } 614 synchronized (documentationHashTable) { 615 LispObject alist = documentationHashTable.get(this); 616 if (alist == null) 617 alist = NIL; 618 LispObject entry = assq(docType, alist); 619 if (entry instanceof Cons) 620 { 621 ((Cons)entry).cdr = documentation; 622 } 623 else 624 { 625 alist = alist.push(new Cons(docType, documentation)); 626 documentationHashTable.put(this, alist); 627 } 628 } 622 629 } 623 630
Note: See TracChangeset
for help on using the changeset viewer.