[llvm] Map byref types to the same type as the this argument so they are called using...
[mono.git] / mono / mini / jit-icalls.c
index 648e69cf18cc49cff4c27e6ee517637df2d83a68..56c7bc8169f76b54e7f1f01caa0e23471a01a259 100644 (file)
@@ -23,6 +23,7 @@
 #include <mono/metadata/exception-internals.h>
 #include <mono/metadata/threads-types.h>
 #include <mono/metadata/reflection-internals.h>
+#include <mono/utils/unlocked.h>
 
 #ifdef ENABLE_LLVM
 #include "mini-llvm-cpp.h"
@@ -1089,16 +1090,6 @@ mono_lconv_to_r8_un (guint64 a)
 }
 #endif
 
-#if defined(__native_client_codegen__) || defined(__native_client__)
-/* When we cross-compile to Native Client we can't directly embed calls */
-/* to the math library on the host. This will use the fmod on the target*/
-double
-mono_fmod(double a, double b)
-{
-       return fmod(a, b);
-}
-#endif
-
 gpointer
 mono_helper_compile_generic_method (MonoObject *obj, MonoMethod *method, gpointer *this_arg)
 {
@@ -1107,7 +1098,7 @@ mono_helper_compile_generic_method (MonoObject *obj, MonoMethod *method, gpointe
        gpointer addr;
        MonoGenericContext *context = mono_method_get_context (method);
 
-       mono_jit_stats.generic_virtual_invocations++;
+       UnlockedIncrement (&mono_jit_stats.generic_virtual_invocations);
 
        if (obj == NULL) {
                mono_set_pending_exception (mono_get_exception_null_reference ());
@@ -1921,8 +1912,8 @@ mono_interruption_checkpoint_from_trampoline (void)
 void
 mono_throw_method_access (MonoMethod *caller, MonoMethod *callee)
 {
-       char *caller_name = mono_method_full_name (caller, 1);
-       char *callee_name = mono_method_full_name (callee, 1);
+       char *caller_name = mono_method_get_reflection_name (caller);
+       char *callee_name = mono_method_get_reflection_name (callee);
        MonoError error;
 
        error_init (&error);