X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mono%2Fmetadata%2Fsgen-scan-object.h;h=48490d781e227d7f58179e5b49e8521ad27923ce;hb=f6c4420d096e238f1e861edbe7483b2ee9167709;hp=c61f1dbf1c948b57be9c5d7b00683559368866f4;hpb=66f9613b0958e24601783de8b8fcbc77b7a07a2a;p=mono.git diff --git a/mono/metadata/sgen-scan-object.h b/mono/metadata/sgen-scan-object.h index c61f1dbf1c9..48490d781e2 100644 --- 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. + * + * SCAN_OBJECT_NOVTABLE - desc is provided by the includer, instead of + * vt. Complex arrays cannot not be scanned. */ #ifndef SCAN_OBJECT_ACTION @@ -45,6 +48,7 @@ #endif { +#ifndef SCAN_OBJECT_NOVTABLE 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; +#endif 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; - 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 @@ -88,6 +100,7 @@ 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) @@ -97,6 +110,11 @@ SCAN_OBJECT_ACTION; #undef SCAN break; +#endif + case DESC_TYPE_COMPLEX_PTRFREE: + /*Nothing to do*/ + SCAN_OBJECT_ACTION; + break; default: g_assert_not_reached (); } @@ -104,3 +122,4 @@ #undef SCAN_OBJECT_NOSCAN #undef SCAN_OBJECT_ACTION +#undef SCAN_OBJECT_NOVTABLE