#include <mono/utils/mono-counters.h>
#include <mono/utils/mono-error-internals.h>
#include <mono/utils/mono-membar.h>
+#include <mono/utils/mono-compiler.h>
#include "mini.h"
/*
* Either IMPL_METHOD or AOT_ADDR will be set on return.
- */
-static gpointer*
-#ifdef __GNUC__
-/*
+ *
+ * MONO_NEVER_INLINE :
* This works against problems when compiling with gcc 4.6 on arm. The 'then' part of
* this line gets executed, even when the condition is false:
* if (impl && mono_method_needs_static_rgctx_invoke (impl, FALSE))
* *need_rgctx_tramp = TRUE;
*/
-__attribute__ ((noinline))
-#endif
- mono_convert_imt_slot_to_vtable_slot (gpointer* slot, mgreg_t *regs, guint8 *code, MonoMethod *method, gboolean lookup_aot, MonoMethod **impl_method, gboolean *need_rgctx_tramp, gboolean *variance_used, gpointer *aot_addr)
+static MONO_NEVER_INLINE gpointer*
+mono_convert_imt_slot_to_vtable_slot (gpointer* slot, mgreg_t *regs, guint8 *code, MonoMethod *method, gboolean lookup_aot, MonoMethod **impl_method, gboolean *need_rgctx_tramp, gboolean *variance_used, gpointer *aot_addr)
{
MonoObject *this_argument = mono_arch_get_this_arg_from_call (regs, code);
MonoVTable *vt = this_argument->vtable;
* We use one vtable trampoline per vtable slot index, so we need only the vtable,
* the other two can be computed from the vtable + the slot index.
*/
-#ifndef MONO_ARCH_THIS_AS_FIRST_ARG
- /* All architectures should support this */
- g_assert_not_reached ();
-#endif
/*
* Obtain the vtable from the 'this' arg.