work/bootstrap/gelex2.c
EIF_INTEGER_32 GE_object_id(EIF_OBJECT object) {
	GE_weak_pointer** id_object_chunk;
	EIF_INTEGER_32 i;
	EIF_INTEGER_32 l_old_capacity;

	GE_last_object_id++;
	i = GE_last_object_id / GE_ID_OBJECT_CHUNK_SIZE;
	if (i >= GE_id_objects_capacity) {
		l_old_capacity = GE_id_objects_capacity;
		GE_id_objects_capacity = GE_id_objects_capacity + GE_ID_OBJECT_CAPACITY_INCREMENT;
		if (GE_id_objects == 0) {
			GE_id_objects = GE_calloc_atomic_uncollectable(GE_id_objects_capacity, sizeof(GE_weak_pointer**));
		} else {
			GE_id_objects = GE_recalloc(GE_id_objects, l_old_capacity, GE_id_objects_capacity, sizeof(GE_weak_pointer**));
		}
	}
	id_object_chunk = GE_id_objects[i];
	if (id_object_chunk == 0) {
		id_object_chunk = GE_calloc_uncollectable(GE_ID_OBJECT_CHUNK_SIZE, sizeof(GE_weak_pointer*));
		GE_id_objects[i] = id_object_chunk;
	}
	i = GE_last_object_id % GE_ID_OBJECT_CHUNK_SIZE;
	id_object_chunk[i] = GE_new_weak_pointer(object);
	return GE_last_object_id;
}
/*
 * Get a new id for `object', assuming it is NOT in the stack.
 */
Get a new id for `object', assuming it is NOT in the stack.
Get a new id for ` object ' assuming it is NOT in the stack .
EIF_INTEGER_32 GE_object_id(EIF_OBJECT object) {
	GE_weak_pointer** id_object_chunk;
	EIF_INTEGER_32 i;
	EIF_INTEGER_32 l_old_capacity;
	GE_last_object_id++;
	i = GE_last_object_id / GE_ID_OBJECT_CHUNK_SIZE;
	if (i >= GE_id_objects_capacity) {
		l_old_capacity = GE_id_objects_capacity;
		GE_id_objects_capacity = GE_id_objects_capacity + GE_ID_OBJECT_CAPACITY_INCREMENT;
		if (GE_id_objects == 0) {
			GE_id_objects = GE_calloc_atomic_uncollectable(GE_id_objects_capacity, sizeof(GE_weak_pointer**));
		} else {
			GE_id_objects = GE_recalloc(GE_id_objects, l_old_capacity, GE_id_objects_capacity, sizeof(GE_weak_pointer**));
		}
	}
	id_object_chunk = GE_id_objects[i];
	if (id_object_chunk == 0) {
		id_object_chunk = GE_calloc_uncollectable(GE_ID_OBJECT_CHUNK_SIZE, sizeof(GE_weak_pointer*));
		GE_id_objects[i] = id_object_chunk;
	}
	i = GE_last_object_id % GE_ID_OBJECT_CHUNK_SIZE;
	id_object_chunk[i] = GE_new_weak_pointer(object);
	return GE_last_object_id;
}
EIF_INTEGER_32 GE_object_id ( EIF_OBJECT object ) { GE_weak_pointer * * id_object_chunk ; EIF_INTEGER_32 i ; EIF_INTEGER_32 l_old_capacity ; GE_last_object_id ++ ; i = GE_last_object_id / GE_ID_OBJECT_CHUNK_SIZE ; if ( i >= GE_id_objects_capacity ) { l_old_capacity = GE_id_objects_capacity ; GE_id_objects_capacity = GE_id_objects_capacity + GE_ID_OBJECT_CAPACITY_INCREMENT ; if ( GE_id_objects == 0 ) { GE_id_objects = GE_calloc_atomic_uncollectable ( GE_id_objects_capacity , sizeof ( GE_weak_pointer * * ) ) ; } else { GE_id_objects = GE_recalloc ( GE_id_objects , l_old_capacity , GE_id_objects_capacity , sizeof ( GE_weak_pointer * * ) ) ; } } id_object_chunk = GE_id_objects [ i ] ; if ( id_object_chunk == 0 ) { id_object_chunk = GE_calloc_uncollectable ( GE_ID_OBJECT_CHUNK_SIZE , sizeof ( GE_weak_pointer * ) ) ; GE_id_objects [ i ] = id_object_chunk ; } i = GE_last_object_id % GE_ID_OBJECT_CHUNK_SIZE ; id_object_chunk [ i ] = GE_new_weak_pointer ( object ) ; return GE_last_object_id ; }
Get a new id for `object', assuming it is NOT in the stack.
Get a new id for ` object ' assuming it is NOT in the stack .