Fixed TLAB_ACCESS_INIT usages in MSVC by declaring the variables explicitly at the...
authorJoao Matos <joao.matos@xamarin.com>
Mon, 26 May 2014 22:39:34 +0000 (23:39 +0100)
committerJoao Matos <joao.matos@xamarin.com>
Mon, 26 May 2014 22:43:11 +0000 (23:43 +0100)
mono/metadata/sgen-alloc.c
mono/metadata/sgen-cardtable.c
mono/metadata/sgen-gc.h

index 6f2909769abb92dfe9aba4a1f5ed2f1433743b94..8ff1ef7f6063c82ec06aa31b2427e3550d12b897 100644 (file)
@@ -187,6 +187,7 @@ mono_gc_alloc_obj_nolock (MonoVTable *vtable, size_t size)
        /* FIXME: handle OOM */
        void **p;
        char *new_next;
+       SgenThreadInfo *__thread_info__;
        TLAB_ACCESS_INIT;
 
        HEAVY_STAT (++stat_objects_alloced);
@@ -368,6 +369,7 @@ mono_gc_try_alloc_obj_nolock (MonoVTable *vtable, size_t size)
 {
        void **p;
        char *new_next;
+       SgenThreadInfo *__thread_info__;
        TLAB_ACCESS_INIT;
 
        size = ALIGN_UP (size);
@@ -454,6 +456,7 @@ void*
 mono_gc_alloc_obj (MonoVTable *vtable, size_t size)
 {
        void *res;
+       SgenThreadInfo *__thread_info__;
 
        if (!SGEN_CAN_ALIGN_UP (size))
                return NULL;
@@ -498,6 +501,7 @@ void*
 mono_gc_alloc_vector (MonoVTable *vtable, size_t size, uintptr_t max_length)
 {
        MonoArray *arr;
+       SgenThreadInfo *__thread_info__;
 
        if (!SGEN_CAN_ALIGN_UP (size))
                return NULL;
@@ -535,6 +539,7 @@ mono_gc_alloc_array (MonoVTable *vtable, size_t size, uintptr_t max_length, uint
 {
        MonoArray *arr;
        MonoArrayBounds *bounds;
+       SgenThreadInfo *__thread_info__;
 
        if (!SGEN_CAN_ALIGN_UP (size))
                return NULL;
@@ -577,7 +582,7 @@ void*
 mono_gc_alloc_string (MonoVTable *vtable, size_t size, gint32 len)
 {
        MonoString *str;
-
+       SgenThreadInfo *__thread_info__;
        if (!SGEN_CAN_ALIGN_UP (size))
                return NULL;
 
index 51f72fe87a4d770b3145c17336787f3a55c3d135..4c4fcf8aa3f68c7e2219a9c5f3426b6a79038220 100644 (file)
@@ -131,6 +131,7 @@ sgen_card_table_wbarrier_arrayref_copy (gpointer dest_ptr, gpointer src_ptr, int
 static void
 sgen_card_table_wbarrier_value_copy (gpointer dest, gpointer src, int count, MonoClass *klass)
 {
+       SgenThreadInfo *__thread_info__;
        size_t element_size = mono_class_value_size (klass, NULL);
        size_t size = count * element_size;
 
@@ -152,6 +153,7 @@ sgen_card_table_wbarrier_value_copy (gpointer dest, gpointer src, int count, Mon
 static void
 sgen_card_table_wbarrier_object_copy (MonoObject* obj, MonoObject *src)
 {
+       SgenThreadInfo *__thread_info__;
        int size = mono_object_class (obj)->instance_size;
 
 #ifdef DISABLE_CRITICAL_REGION
index 7008cec2f7475c84ba284b327249a739a113d631..0df3f682b0b418da925a4d6a990332fda311f302 100644 (file)
@@ -982,7 +982,7 @@ extern __thread char *stack_end;
 #define TLAB_ACCESS_INIT
 #define IN_CRITICAL_REGION sgen_thread_info->in_critical_region
 #else
-#define TLAB_ACCESS_INIT       SgenThreadInfo *__thread_info__ = mono_native_tls_get_value (thread_info_key)
+#define TLAB_ACCESS_INIT       __thread_info__ = mono_native_tls_get_value (thread_info_key)
 #define IN_CRITICAL_REGION (__thread_info__->in_critical_region)
 #endif