projects
/
mono.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[sgen] Fix race conditions in worker thread start/stop.
[mono.git]
/
mono
/
metadata
/
sgen-scan-object.h
diff --git
a/mono/metadata/sgen-scan-object.h
b/mono/metadata/sgen-scan-object.h
index c61f1dbf1c948b57be9c5d7b00683559368866f4..48490d781e227d7f58179e5b49e8521ad27923ce 100644
(file)
--- a/
mono/metadata/sgen-scan-object.h
+++ b/
mono/metadata/sgen-scan-object.h
@@
-38,6
+38,9
@@
* padding at the end) is "skip_size". "desc" is the object's GC
* descriptor. The action can use the macro
* "SCAN" to scan the object.
* padding at the end) is "skip_size". "desc" is the object's GC
* descriptor. The action can use the macro
* "SCAN" to scan the object.
+ *
+ * SCAN_OBJECT_NOVTABLE - desc is provided by the includer, instead of
+ * vt. Complex arrays cannot not be scanned.
*/
#ifndef SCAN_OBJECT_ACTION
*/
#ifndef SCAN_OBJECT_ACTION
@@
-45,6
+48,7
@@
#endif
{
#endif
{
+#ifndef SCAN_OBJECT_NOVTABLE
GCVTable *vt;
mword desc;
GCVTable *vt;
mword desc;
@@
-53,6
+57,7
@@
/* gcc should be smart enough to remove the bounds check, but it isn't:( */
desc = vt->desc;
/* gcc should be smart enough to remove the bounds check, but it isn't:( */
desc = vt->desc;
+#endif
switch (desc & 0x7) {
case DESC_TYPE_RUN_LENGTH:
#define SCAN OBJ_RUN_LEN_FOREACH_PTR (desc, start)
switch (desc & 0x7) {
case DESC_TYPE_RUN_LENGTH:
#define SCAN OBJ_RUN_LEN_FOREACH_PTR (desc, start)
@@
-62,7
+67,14
@@
SCAN_OBJECT_ACTION;
#undef SCAN
break;
SCAN_OBJECT_ACTION;
#undef SCAN
break;
- case DESC_TYPE_ARRAY:
+ case DESC_TYPE_SMALL_BITMAP:
+#define SCAN OBJ_BITMAP_FOREACH_PTR (desc, start)
+#ifndef SCAN_OBJECT_NOSCAN
+ SCAN;
+#endif
+ SCAN_OBJECT_ACTION;
+#undef SCAN
+ break;
case DESC_TYPE_VECTOR:
#define SCAN OBJ_VECTOR_FOREACH_PTR (desc, start)
#ifndef SCAN_OBJECT_NOSCAN
case DESC_TYPE_VECTOR:
#define SCAN OBJ_VECTOR_FOREACH_PTR (desc, start)
#ifndef SCAN_OBJECT_NOSCAN
@@
-88,6
+100,7
@@
SCAN_OBJECT_ACTION;
#undef SCAN
break;
SCAN_OBJECT_ACTION;
#undef SCAN
break;
+#ifndef SCAN_OBJECT_NOVTABLE
case DESC_TYPE_COMPLEX_ARR:
/* this is an array of complex structs */
#define SCAN OBJ_COMPLEX_ARR_FOREACH_PTR (vt, start)
case DESC_TYPE_COMPLEX_ARR:
/* this is an array of complex structs */
#define SCAN OBJ_COMPLEX_ARR_FOREACH_PTR (vt, start)
@@
-97,6
+110,11
@@
SCAN_OBJECT_ACTION;
#undef SCAN
break;
SCAN_OBJECT_ACTION;
#undef SCAN
break;
+#endif
+ case DESC_TYPE_COMPLEX_PTRFREE:
+ /*Nothing to do*/
+ SCAN_OBJECT_ACTION;
+ break;
default:
g_assert_not_reached ();
}
default:
g_assert_not_reached ();
}
@@
-104,3
+122,4
@@
#undef SCAN_OBJECT_NOSCAN
#undef SCAN_OBJECT_ACTION
#undef SCAN_OBJECT_NOSCAN
#undef SCAN_OBJECT_ACTION
+#undef SCAN_OBJECT_NOVTABLE