Author: zoltan
Date: 2006-01-17 10:23:07 -0500 (Tue, 17 Jan 2006)
New Revision: 55680
Modified:
trunk/mono/mono/utils/ChangeLog
trunk/mono/mono/utils/monobitset.c
trunk/mono/mono/utils/monobitset.h
Log:
2006-01-17 Zoltan Varga <[EMAIL PROTECTED]>
* monobitset.h monobitset.c: Move the mono_bitset_test_fast macro here
from mini.h. Also fix it after the 64 bit changes.
Modified: trunk/mono/mono/utils/ChangeLog
===================================================================
--- trunk/mono/mono/utils/ChangeLog 2006-01-17 12:46:05 UTC (rev 55679)
+++ trunk/mono/mono/utils/ChangeLog 2006-01-17 15:23:07 UTC (rev 55680)
@@ -1,3 +1,8 @@
+2006-01-17 Zoltan Varga <[EMAIL PROTECTED]>
+
+ * monobitset.h monobitset.c: Move the mono_bitset_test_fast macro here
+ from mini.h. Also fix it after the 64 bit changes.
+
2006-01-15 Zoltan Varga <[EMAIL PROTECTED]>
* monobitset.h monobitset.c: Use 64 bit chunks on 64 bit machines.
Modified: trunk/mono/mono/utils/monobitset.c
===================================================================
--- trunk/mono/mono/utils/monobitset.c 2006-01-17 12:46:05 UTC (rev 55679)
+++ trunk/mono/mono/utils/monobitset.c 2006-01-17 15:23:07 UTC (rev 55680)
@@ -10,11 +10,11 @@
#define MONO_ZERO_LEN_ARRAY 1
#endif
-#define BITS_PER_CHUNK (8 * sizeof (gsize))
+#define BITS_PER_CHUNK MONO_BITSET_BITS_PER_CHUNK
struct MonoBitSet {
- guint32 size;
- guint32 flags;
+ gsize size;
+ gsize flags;
gsize data [MONO_ZERO_LEN_ARRAY];
};
Modified: trunk/mono/mono/utils/monobitset.h
===================================================================
--- trunk/mono/mono/utils/monobitset.h 2006-01-17 12:46:05 UTC (rev 55679)
+++ trunk/mono/mono/utils/monobitset.h 2006-01-17 15:23:07 UTC (rev 55680)
@@ -10,6 +10,11 @@
MONO_BITSET_DONT_FREE = 1
};
+#define MONO_BITSET_BITS_PER_CHUNK (8 * sizeof (gsize))
+
+/* Fast access to bits which depends on the implementation of the bitset */
+#define mono_bitset_test_fast(set,n)
(((gsize*)set)[2+(n)/MONO_BITSET_BITS_PER_CHUNK] & ((gsize)1 << ((n) %
MONO_BITSET_BITS_PER_CHUNK)))
+
/*
* Interface documentation can be found in the c-file.
* Interface documentation by Dennis Haney.
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches