[runtime] Change the semantics of mono_error_set_type_load_name to acquire alloc...
[mono.git] / mono / metadata / sgen-scan-object.h
index ebd907e2aa4997bcd04d91603eaee51a18b99f26..7cbe57a6c83e82f9c59d6dc7345120d2e2bf7540 100644 (file)
  * SCAN_OBJECT_NOSCAN - if defined, don't actually scan the object,
  * i.e. don't invoke the OBJ_XXX macros.
  *
- * SCAN_OBJECT_ACTION - is invoked after an object has been scanned.
- * The object's start is "start", its length in bytes (including
- * 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.
  *
  * collection, not for debugging scans.
  */
 
-#ifndef SCAN_OBJECT_ACTION
-#define SCAN_OBJECT_ACTION
-#endif
-
 {
 #ifndef SCAN_OBJECT_NOVTABLE
        GCVTable *vt;
        /* gcc should be smart enough to remove the bounds check, but it isn't:( */
        desc = vt->desc;
 
-#if defined(SGEN_BINARY_PROTOCOL) && defined(SCAN_OBJECT_PROTOCOL)
+#if defined(SGEN_HEAVY_BINARY_PROTOCOL) && defined(SCAN_OBJECT_PROTOCOL)
        binary_protocol_scan_begin (start, vt, sgen_safe_object_get_size ((MonoObject*)start));
 #endif
 #else
-#if defined(SGEN_BINARY_PROTOCOL) && defined(SCAN_OBJECT_PROTOCOL)
+#if defined(SGEN_HEAVY_BINARY_PROTOCOL) && defined(SCAN_OBJECT_PROTOCOL)
        binary_protocol_scan_vtype_begin (start + sizeof (MonoObject), size);
 #endif
 #endif
@@ -73,7 +63,6 @@
 #ifndef SCAN_OBJECT_NOSCAN
                SCAN;
 #endif
-               SCAN_OBJECT_ACTION;
 #undef SCAN
                break;
        case DESC_TYPE_SMALL_BITMAP:
@@ -81,7 +70,6 @@
 #ifndef SCAN_OBJECT_NOSCAN
                SCAN;
 #endif
-               SCAN_OBJECT_ACTION;
 #undef SCAN
                break;
        case DESC_TYPE_VECTOR:
@@ -89,7 +77,6 @@
 #ifndef SCAN_OBJECT_NOSCAN
                SCAN;
 #endif
-               SCAN_OBJECT_ACTION;
 #undef SCAN
                break;
        case DESC_TYPE_LARGE_BITMAP:
@@ -97,7 +84,6 @@
 #ifndef SCAN_OBJECT_NOSCAN
                SCAN;
 #endif
-               SCAN_OBJECT_ACTION;
 #undef SCAN
                break;
        case DESC_TYPE_COMPLEX:
 #ifndef SCAN_OBJECT_NOSCAN
                SCAN;
 #endif
-               SCAN_OBJECT_ACTION;
 #undef SCAN
                break;
 #ifndef SCAN_OBJECT_NOVTABLE
 #ifndef SCAN_OBJECT_NOSCAN
                SCAN;
 #endif
-               SCAN_OBJECT_ACTION;
 #undef SCAN
                break;
 #endif
        case DESC_TYPE_COMPLEX_PTRFREE:
                /*Nothing to do*/
-               SCAN_OBJECT_ACTION;
                break;
        default:
                g_assert_not_reached ();
 }
 
 #undef SCAN_OBJECT_NOSCAN
-#undef SCAN_OBJECT_ACTION
 #undef SCAN_OBJECT_NOVTABLE
 #undef SCAN_OBJECT_PROTOCOL