work/bootstrap/gelex2.c
EIF_REFERENCE GE_id_object(EIF_INTEGER_32 id) {
	GE_weak_pointer** id_object_chunk;
	GE_weak_pointer* wp;
	EIF_REFERENCE object;
	EIF_INTEGER_32 i;

	i = id / GE_ID_OBJECT_CHUNK_SIZE;
	if (i >= GE_id_objects_capacity) {
		return (EIF_REFERENCE) 0;
	} else {
		id_object_chunk = GE_id_objects[i];
		if (id_object_chunk == 0) {
			return (EIF_REFERENCE) 0;
		} else {
			i = id % GE_ID_OBJECT_CHUNK_SIZE;
			wp = id_object_chunk[i];
			if (wp == 0) {
				return (EIF_REFERENCE) 0;
			} else {
				object = GE_weak_pointer_object(wp);
				if (object == 0) {
					id_object_chunk[i] = (GE_weak_pointer*) 0;
#ifdef EIF_BOEHM_GC
					GC_unregister_disappearing_link(&wp->object);
#endif
					GE_free(wp);
					return (EIF_REFERENCE) 0;
				} else {
					return object;
				}
			}
		}
	}
}
/*
 * Return the object associated with `id'.
 */
Return the object associated with `id'.
Return the object associated with ` id ' .
EIF_REFERENCE GE_id_object(EIF_INTEGER_32 id) {
	GE_weak_pointer** id_object_chunk;
	GE_weak_pointer* wp;
	EIF_REFERENCE object;
	EIF_INTEGER_32 i;
	i = id / GE_ID_OBJECT_CHUNK_SIZE;
	if (i >= GE_id_objects_capacity) {
		return (EIF_REFERENCE) 0;
	} else {
		id_object_chunk = GE_id_objects[i];
		if (id_object_chunk == 0) {
			return (EIF_REFERENCE) 0;
		} else {
			i = id % GE_ID_OBJECT_CHUNK_SIZE;
			wp = id_object_chunk[i];
			if (wp == 0) {
				return (EIF_REFERENCE) 0;
			} else {
				object = GE_weak_pointer_object(wp);
				if (object == 0) {
					id_object_chunk[i] = (GE_weak_pointer*) 0;
#ifdef EIF_BOEHM_GC
					GC_unregister_disappearing_link(&wp->object);
#endif
					GE_free(wp);
					return (EIF_REFERENCE) 0;
				} else {
					return object;
				}
			}
		}
	}
}
EIF_REFERENCE GE_id_object ( EIF_INTEGER_32 id ) { GE_weak_pointer * * id_object_chunk ; GE_weak_pointer * wp ; EIF_REFERENCE object ; EIF_INTEGER_32 i ; i = id / GE_ID_OBJECT_CHUNK_SIZE ; if ( i >= GE_id_objects_capacity ) { return ( EIF_REFERENCE ) 0 ; } else { id_object_chunk = GE_id_objects [ i ] ; if ( id_object_chunk == 0 ) { return ( EIF_REFERENCE ) 0 ; } else { i = id % GE_ID_OBJECT_CHUNK_SIZE ; wp = id_object_chunk [ i ] ; if ( wp == 0 ) { return ( EIF_REFERENCE ) 0 ; } else { object = GE_weak_pointer_object ( wp ) ; if ( object == 0 ) { id_object_chunk [ i ] = ( GE_weak_pointer * ) 0 ; #ifdef EIF_BOEHM_GC GC_unregister_disappearing_link ( & wp -> object ) ; #endif GE_free ( wp ) ; return ( EIF_REFERENCE ) 0 ; } else { return object ; } } } } }
Return the object associated with `id'.
Return the object associated with ` id ' .