1 // class cl_wht_from_rcpointer_to_rcpointer.
4 #include "base/cl_sysdep.h"
7 #include "base/hash/cl_rcpointer_hashweak_rcpointer.h"
12 #include "base/hash/cl_hash1weak.h"
16 static void cl_weak_hashtable_from_rcpointer_to_rcpointer_destructor (cl_heap* pointer)
18 #if (defined(__mips__) || defined(__mips64__)) && !defined(__GNUC__) // workaround SGI CC bug
19 (*(cl_heap_weak_hashtable_from_rcpointer_to_rcpointer*)pointer).~cl_heap_weak_hashtable_1();
21 (*(cl_heap_weak_hashtable_from_rcpointer_to_rcpointer*)pointer).~cl_heap_weak_hashtable_from_rcpointer_to_rcpointer();
25 cl_class cl_class_weak_hashtable_from_rcpointer_to_rcpointer = {
26 cl_weak_hashtable_from_rcpointer_to_rcpointer_destructor,
30 // These are not inline, because they tend to duplicate a lot of template code.
32 cl_wht_from_rcpointer_to_rcpointer::cl_wht_from_rcpointer_to_rcpointer (bool (*maygc_htentry) (const cl_htentry_from_rcpointer_to_rcpointer&))
34 var cl_heap_weak_hashtable_from_rcpointer_to_rcpointer* ht = new cl_heap_weak_hashtable_from_rcpointer_to_rcpointer (maygc_htentry);
36 ht->type = &cl_class_weak_hashtable_from_rcpointer_to_rcpointer;
40 cl_rcpointer * cl_wht_from_rcpointer_to_rcpointer::get (const cl_rcpointer& x) const
42 return ((cl_heap_weak_hashtable_from_rcpointer_to_rcpointer*)pointer)->get(x);
45 void cl_wht_from_rcpointer_to_rcpointer::put (const cl_rcpointer& x, const cl_rcpointer& y) const
47 ((cl_heap_weak_hashtable_from_rcpointer_to_rcpointer*)pointer)->put(x,y);