factor/native/hashtable.c

27 lines
531 B
C
Raw Normal View History

2005-01-27 20:06:10 -05:00
#include "factor.h"
void primitive_hashtable(void)
{
2005-11-27 17:45:48 -05:00
F_HASHTABLE* hash;
2005-06-16 18:50:49 -04:00
maybe_gc(0);
2005-12-25 01:00:10 -05:00
hash = allot_object(HASHTABLE_TYPE,sizeof(F_HASHTABLE));
2005-11-27 17:45:48 -05:00
hash->count = F;
hash->deleted = F;
hash->array = F;
dpush(tag_object(hash));
2005-01-27 20:06:10 -05:00
}
void fixup_hashtable(F_HASHTABLE* hashtable)
{
2005-11-24 19:02:20 -05:00
data_fixup(&hashtable->count);
data_fixup(&hashtable->deleted);
2005-01-27 20:06:10 -05:00
data_fixup(&hashtable->array);
}
void collect_hashtable(F_HASHTABLE* hashtable)
{
2005-11-24 19:02:20 -05:00
copy_handle(&hashtable->count);
copy_handle(&hashtable->deleted);
2005-05-12 01:02:39 -04:00
copy_handle(&hashtable->array);
2005-01-27 20:06:10 -05:00
}