First set of licensing changes
[mono.git] / mono / mini / mini-runtime.c
index 6a9f054864b68efb5c4915a9b234c442443ec58e..06238b4d68898a161a0b196d77a2fb05774f94f4 100644 (file)
@@ -1,3 +1,4 @@
+
 /*
  * mini-runtime.c: Runtime code for the JIT
  *
@@ -8,6 +9,7 @@
  * Copyright 2002-2003 Ximian, Inc.
  * Copyright 2003-2010 Novell, Inc.
  * Copyright 2011-2015 Xamarin, Inc (http://www.xamarin.com)
+ * Licensed under the MIT license. See LICENSE file in the project root for full license information.
  */
 
 #include <config.h>
@@ -2007,7 +2009,9 @@ mono_jit_compile_method_with_opt (MonoMethod *method, guint32 opt, MonoError *er
                        MonoVTable *vtable;
 
                        mono_jit_stats.methods_lookups++;
-                       vtable = mono_class_vtable (domain, method->klass);
+                       vtable = mono_class_vtable_full (domain, method->klass, error);
+                       if (!is_ok (error))
+                               return NULL;
                        g_assert (vtable);
                        if (!mono_runtime_class_init_full (vtable, error))
                                return NULL;
@@ -2388,7 +2392,7 @@ create_runtime_invoke_info (MonoDomain *domain, MonoMethod *method, gpointer com
 
        if (!info->dyn_call_info) {
                if (mono_llvm_only) {
-#ifndef ENABLE_GSHAREDVT
+#ifndef MONO_ARCH_GSHAREDVT_SUPPORTED
                        g_assert_not_reached ();
 #endif
                        info->gsharedvt_invoke = TRUE;
@@ -2500,7 +2504,7 @@ mono_llvmonly_runtime_invoke (MonoMethod *method, RuntimeInvokeInfo *info, void
                mono_error_set_exception_instance (error, (MonoException*) *exc);
 
        if (sig->ret->type != MONO_TYPE_VOID && info->ret_box_class)
-               return mono_value_box (domain, info->ret_box_class, retval);
+               return mono_value_box_checked (domain, info->ret_box_class, retval, error);
        else
                return *(MonoObject**)retval;
 }
@@ -2675,7 +2679,7 @@ mono_jit_runtime_invoke (MonoMethod *method, void *obj, void **params, MonoObjec
                mono_arch_finish_dyn_call (info->dyn_call_info, buf);
 
                if (info->ret_box_class)
-                       return mono_value_box (domain, info->ret_box_class, retval);
+                       return mono_value_box_checked (domain, info->ret_box_class, retval, error);
                else
                        return *(MonoObject**)retval;
        }