From 30951a5fe82fa2cbd0c99c628eb830d0d4733a0a Mon Sep 17 00:00:00 2001 From: Jonathan Chambers Date: Thu, 30 Aug 2012 22:49:06 -0400 Subject: [PATCH] Wrap always_inline and noinline attributes in compiler checks and use MSVC equivalent. --- mono/metadata/sgen-copy-object.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/mono/metadata/sgen-copy-object.h b/mono/metadata/sgen-copy-object.h index 55f3f8fb409..767be65fc53 100644 --- a/mono/metadata/sgen-copy-object.h +++ b/mono/metadata/sgen-copy-object.h @@ -90,7 +90,11 @@ par_copy_object_no_checks (char *destination, MonoVTable *vt, void *obj, mword o } } +#ifdef _MSC_VER +static __declspec(noinline) void* +#else static G_GNUC_UNUSED void* __attribute__((noinline)) +#endif copy_object_no_checks (void *obj, SgenGrayQueue *queue) { MonoVTable *vt = ((MonoObject*)obj)->vtable; @@ -150,7 +154,11 @@ extern long long stat_nursery_copy_object_failed_to_space; /* from sgen-gc.c */ * copy_object could be made into a macro once debugged (use inline for now). */ +#ifdef _MSC_VER +static __forceinline void +#else static inline void __attribute__((always_inline)) +#endif serial_copy_object (void **obj_slot, SgenGrayQueue *queue) { char *forwarded; -- 2.25.1