diff options
58 files changed, 426 insertions, 412 deletions
diff --git a/mono/dis/dump.c b/mono/dis/dump.c index 30f889bb3bc..5bfc80614c6 100755 --- a/mono/dis/dump.c +++ b/mono/dis/dump.c @@ -968,7 +968,7 @@ dump_table_customattr (MonoImage *m) method = get_method (m, mtoken, NULL); meth = mono_get_method_checked (m, mtoken, NULL, NULL, error); if (meth) { - params = custom_attr_params (m, mono_method_signature (meth), mono_metadata_blob_heap (m, cols [MONO_CUSTOM_ATTR_VALUE])); + params = custom_attr_params (m, mono_method_signature_internal (meth), mono_metadata_blob_heap (m, cols [MONO_CUSTOM_ATTR_VALUE])); fprintf (output, "%d: %s: %s [%s]\n", i, desc, method, params); g_free (params); } else { diff --git a/mono/dis/get.c b/mono/dis/get.c index fc0b067eaac..a7643673c85 100755 --- a/mono/dis/get.c +++ b/mono/dis/get.c @@ -1947,7 +1947,7 @@ get_method_core (MonoImage *m, guint32 token, gboolean fullsig, MonoGenericConta mh = mono_get_method_checked (m, token, NULL, (MonoGenericContext *) container, error); if (mh) { - if (mono_method_signature (mh)->is_inflated) + if (mono_method_signature_internal (mh)->is_inflated) container = mono_method_get_generic_container (((MonoMethodInflated *) mh)->declaring); esname = get_escaped_name (mh->name); sig = dis_stringify_type (m, m_class_get_byval_arg (mh->klass), TRUE); diff --git a/mono/metadata/class-init.c b/mono/metadata/class-init.c index 802bd8d9685..08166466e88 100644 --- a/mono/metadata/class-init.c +++ b/mono/metadata/class-init.c @@ -1917,8 +1917,8 @@ mono_signature_get_full_desc (MonoMethodSignature *sig, gboolean include_namespa } static void print_method_signatures (MonoMethod *im, MonoMethod *cm) { - char *im_sig = mono_signature_get_full_desc (mono_method_signature (im), TRUE); - char *cm_sig = mono_signature_get_full_desc (mono_method_signature (cm), TRUE); + char *im_sig = mono_signature_get_full_desc (mono_method_signature_internal (im), TRUE); + char *cm_sig = mono_signature_get_full_desc (mono_method_signature_internal (cm), TRUE); printf ("(IM \"%s\", CM \"%s\")", im_sig, cm_sig); g_free (im_sig); g_free (cm_sig); @@ -1962,8 +1962,8 @@ check_interface_method_override (MonoClass *klass, MonoMethod *im, MonoMethod *c TRACE_INTERFACE_VTABLE (printf ("[FULL SLOT REFUSED]")); } } - cmsig = mono_method_signature (cm); - imsig = mono_method_signature (im); + cmsig = mono_method_signature_internal (cm); + imsig = mono_method_signature_internal (im); if (!cmsig || !imsig) { mono_class_set_type_load_failure (klass, "Could not resolve the signature of a virtual method"); return FALSE; @@ -2004,8 +2004,8 @@ check_interface_method_override (MonoClass *klass, MonoMethod *im, MonoMethod *c TRACE_INTERFACE_VTABLE (printf ("[RANK CHECK FAILED]")); return FALSE; } - cmsig = mono_method_signature (cm); - imsig = mono_method_signature (im); + cmsig = mono_method_signature_internal (cm); + imsig = mono_method_signature_internal (im); if (!cmsig || !imsig) { mono_class_set_type_load_failure (klass, "Could not resolve the signature of a virtual method"); return FALSE; @@ -2560,7 +2560,7 @@ print_unimplemented_interface_method_info (MonoClass *klass, MonoClass *ic, Mono mono_trace_warning (MONO_TRACE_TYPE, " at slot %d: %s (%d) overrides %s (%d)", im_slot, overrides [index*2+1]->name, overrides [index*2+1]->slot, overrides [index*2]->name, overrides [index*2]->slot); } - method_signature = mono_signature_get_desc (mono_method_signature (im), FALSE); + method_signature = mono_signature_get_desc (mono_method_signature_internal (im), FALSE); type_name = mono_type_full_name (m_class_get_byval_arg (klass)); mono_trace_warning (MONO_TRACE_TYPE, "no implementation for interface method %s::%s(%s) in class %s", mono_type_get_name (m_class_get_byval_arg (ic)), im->name, method_signature, type_name); @@ -2576,7 +2576,7 @@ print_unimplemented_interface_method_info (MonoClass *klass, MonoClass *ic, Mono mcount = mono_class_get_method_count (klass); for (index = 0; index < mcount; ++index) { MonoMethod *cm = klass->methods [index]; - method_signature = mono_signature_get_desc (mono_method_signature (cm), TRUE); + method_signature = mono_signature_get_desc (mono_method_signature_internal (cm), TRUE); mono_trace_warning (MONO_TRACE_TYPE, "METHOD %s(%s)", cm->name, method_signature); g_free (method_signature); @@ -3087,8 +3087,8 @@ mono_class_setup_vtable_general (MonoClass *klass, MonoMethod **overrides, int o while ((m1 = mono_class_get_virtual_methods (k, &k_iter))) { MonoMethodSignature *cmsig, *m1sig; - cmsig = mono_method_signature (cm); - m1sig = mono_method_signature (m1); + cmsig = mono_method_signature_internal (cm); + m1sig = mono_method_signature_internal (m1); if (!cmsig || !m1sig) /* FIXME proper error message, use signature_checked? */ goto fail; diff --git a/mono/metadata/class-internals.h b/mono/metadata/class-internals.h index fe46bea70a2..26d4f8312b2 100644 --- a/mono/metadata/class-internals.h +++ b/mono/metadata/class-internals.h @@ -832,6 +832,9 @@ mono_class_get_context (MonoClass *klass); MONO_PROFILER_API MonoMethodSignature* mono_method_signature_checked (MonoMethod *m, MonoError *err); +MONO_PROFILER_API MonoMethodSignature* +mono_method_signature_internal (MonoMethod *m); + MonoGenericContext* mono_method_get_context_general (MonoMethod *method, gboolean uninflated); diff --git a/mono/metadata/class.c b/mono/metadata/class.c index 7d31ca0016d..058f0e6e000 100644 --- a/mono/metadata/class.c +++ b/mono/metadata/class.c @@ -944,7 +944,7 @@ mono_class_inflate_generic_method_checked (MonoMethod *method, MonoGenericContex * On failure returns NULL and sets \p error. * * BEWARE: All non-trivial fields are invalid, including klass, signature, and header. - * Use mono_method_signature() and mono_method_get_header() to get the correct values. + * Use mono_method_signature_internal () and mono_method_get_header () to get the correct values. */ MonoMethod* mono_class_inflate_generic_method_full_checked (MonoMethod *method, MonoClass *klass_hint, MonoGenericContext *context, MonoError *error) @@ -1016,7 +1016,7 @@ mono_class_inflate_generic_method_full_checked (MonoMethod *method, MonoClass *k UnlockedAdd (&mono_inflated_methods_size, sizeof (MonoMethodInflated)); - sig = mono_method_signature (method); + sig = mono_method_signature_internal (method); if (!sig) { char *name = mono_type_get_full_name (method->klass); mono_error_set_bad_image (error, mono_method_get_image (method), "Could not resolve signature of method %s:%s", name, method->name); @@ -5190,7 +5190,7 @@ mono_class_get_method_from_name_checked (MonoClass *klass, const char *name, if (method->name[0] == name [0] && !strcmp (name, method->name) && - (param_count == -1 || mono_method_signature (method)->param_count == param_count) && + (param_count == -1 || mono_method_signature_internal (method)->param_count == param_count) && ((method->flags & flags) == flags)) { res = method; break; diff --git a/mono/metadata/cominterop.c b/mono/metadata/cominterop.c index 0f861082aa1..c48d8b8a882 100644 --- a/mono/metadata/cominterop.c +++ b/mono/metadata/cominterop.c @@ -269,7 +269,7 @@ cominterop_method_signature (MonoMethod* method) { MonoMethodSignature *res; MonoImage *image = m_class_get_image (method->klass); - MonoMethodSignature *sig = mono_method_signature (method); + MonoMethodSignature *sig = mono_method_signature_internal (method); gboolean preserve_sig = method->iflags & METHOD_IMPL_ATTRIBUTE_PRESERVE_SIG; int sigsize; int i; @@ -945,7 +945,7 @@ cominterop_get_native_wrapper_adjusted (MonoMethod *method) MonoMethodPInvoke *piinfo = (MonoMethodPInvoke *) method; int i; - sig = mono_method_signature (method); + sig = mono_method_signature_internal (method); // create unmanaged wrapper mb_native = mono_mb_new (method->klass, method->name, MONO_WRAPPER_MANAGED_TO_NATIVE); @@ -1057,7 +1057,7 @@ mono_cominterop_get_native_wrapper (MonoMethod *method) mono_class_setup_methods (method->klass); g_assert (!mono_class_has_failure (method->klass)); /*FIXME do proper error handling*/ - sig = mono_method_signature (method); + sig = mono_method_signature_internal (method); mb = mono_mb_new (method->klass, method->name, MONO_WRAPPER_COMINTEROP); #ifndef DISABLE_JIT @@ -1950,7 +1950,7 @@ cominterop_setup_marshal_context (EmitMarshalContext *m, MonoMethod *method) { MonoMethodSignature *sig, *csig; MonoImage *method_klass_image = m_class_get_image (method->klass); - sig = mono_method_signature (method); + sig = mono_method_signature_internal (method); /* we copy the signature, so that we can modify it */ /* FIXME: which to use? */ csig = mono_metadata_signature_dup_full (method_klass_image, sig); @@ -2093,12 +2093,12 @@ cominterop_get_ccw_checked (MonoObjectHandle object, MonoClass* itf, MonoError * MonoMethod *wrapper_method, *adjust_method; MonoMethod *method = m_class_get_methods (iface) [i]; MonoMethodSignature* sig_adjusted; - MonoMethodSignature* sig = mono_method_signature (method); + MonoMethodSignature* sig = mono_method_signature_internal (method); gboolean preserve_sig = method->iflags & METHOD_IMPL_ATTRIBUTE_PRESERVE_SIG; mb = mono_mb_new (iface, method->name, MONO_WRAPPER_NATIVE_TO_MANAGED); adjust_method = cominterop_get_managed_wrapper_adjusted (method); - sig_adjusted = mono_method_signature (adjust_method); + sig_adjusted = mono_method_signature_internal (adjust_method); mspecs = g_new (MonoMarshalSpec*, sig_adjusted->param_count + 1); mono_method_get_marshal_info (method, mspecs); @@ -2329,7 +2329,7 @@ cominterop_get_managed_wrapper_adjusted (MonoMethod *method) mono_error_assert_ok (error); } - sig = mono_method_signature (method); + sig = mono_method_signature_internal (method); /* create unmanaged wrapper */ mb = mono_mb_new (method->klass, method->name, MONO_WRAPPER_COMINTEROP); diff --git a/mono/metadata/custom-attrs.c b/mono/metadata/custom-attrs.c index f2eef9fad26..d857372a358 100644 --- a/mono/metadata/custom-attrs.c +++ b/mono/metadata/custom-attrs.c @@ -846,7 +846,7 @@ create_custom_attr (MonoImage *image, MonoMethod *method, const guchar *data, gu /*g_print ("got attr %s\n", method->klass->name);*/ - sig = mono_method_signature (method); + sig = mono_method_signature_internal (method); if (sig->param_count < 32) { params = params_buf; memset (params, 0, sizeof (void*) * sig->param_count); @@ -857,9 +857,9 @@ create_custom_attr (MonoImage *image, MonoMethod *method, const guchar *data, gu /* skip prolog */ p += 2; - for (i = 0; i < mono_method_signature (method)->param_count; ++i) { + for (i = 0; i < mono_method_signature_internal (method)->param_count; ++i) { MonoObject *param_obj; - params [i] = load_cattr_value (image, mono_method_signature (method)->params [i], ¶m_obj, p, data_end, &p, error); + params [i] = load_cattr_value (image, mono_method_signature_internal (method)->params [i], ¶m_obj, p, data_end, &p, error); if (param_obj) params [i] = param_obj; goto_if_nok (error, fail); @@ -947,8 +947,8 @@ create_custom_attr (MonoImage *image, MonoMethod *method, const guchar *data, gu } /* can we have more that 1 arg in a custom attr named property? */ - prop_type = prop->get? mono_method_signature (prop->get)->ret : - mono_method_signature (prop->set)->params [mono_method_signature (prop->set)->param_count - 1]; + prop_type = prop->get? mono_method_signature_internal (prop->get)->ret : + mono_method_signature_internal (prop->set)->params [mono_method_signature_internal (prop->set)->param_count - 1]; MonoObject *param_obj; pparams [0] = load_cattr_value (image, prop_type, ¶m_obj, named, data_end, &named, error); @@ -1030,13 +1030,13 @@ mono_reflection_create_custom_attr_data_args (MonoImage *image, MonoMethod *meth /* Parse each argument corresponding to the signature's parameters from * the blob and store in typedargs. */ - typedargs = mono_array_new_checked (domain, mono_get_object_class (), mono_method_signature (method)->param_count, error); + typedargs = mono_array_new_checked (domain, mono_get_object_class (), mono_method_signature_internal (method)->param_count, error); return_if_nok (error); - for (i = 0; i < mono_method_signature (method)->param_count; ++i) { + for (i = 0; i < mono_method_signature_internal (method)->param_count; ++i) { MonoObject *obj; - obj = load_cattr_value_boxed (domain, image, mono_method_signature (method)->params [i], p, data_end, &p, error); + obj = load_cattr_value_boxed (domain, image, mono_method_signature_internal (method)->params [i], p, data_end, &p, error); return_if_nok (error); mono_array_setref (typedargs, i, obj); } @@ -1124,8 +1124,8 @@ mono_reflection_create_custom_attr_data_args (MonoImage *image, MonoMethod *meth goto fail; } - prop_type = prop->get? mono_method_signature (prop->get)->ret : - mono_method_signature (prop->set)->params [mono_method_signature (prop->set)->param_count - 1]; + prop_type = prop->get? mono_method_signature_internal (prop->get)->ret : + mono_method_signature_internal (prop->set)->params [mono_method_signature_internal (prop->set)->param_count - 1]; arginfo [j].type = prop_type; arginfo [j].prop = prop; @@ -1168,7 +1168,7 @@ mono_reflection_create_custom_attr_data_args_noalloc (MonoImage *image, MonoMeth const char *named; guint32 i, j, num_named; CattrNamedArg *arginfo = NULL; - MonoMethodSignature *sig = mono_method_signature (method); + MonoMethodSignature *sig = mono_method_signature_internal (method); *typed_args = NULL; *named_args = NULL; @@ -1274,8 +1274,8 @@ mono_reflection_create_custom_attr_data_args_noalloc (MonoImage *image, MonoMeth goto fail; } - prop_type = prop->get? mono_method_signature (prop->get)->ret : - mono_method_signature (prop->set)->params [mono_method_signature (prop->set)->param_count - 1]; + prop_type = prop->get? mono_method_signature_internal (prop->get)->ret : + mono_method_signature_internal (prop->set)->params [mono_method_signature_internal (prop->set)->param_count - 1]; arginfo [j].type = prop_type; arginfo [j].prop = prop; @@ -1331,12 +1331,12 @@ reflection_resolve_custom_attribute_data (MonoReflectionMethod *ref_method, Mono if (!typedargs || !namedargs) goto leave; - for (i = 0; i < mono_method_signature (method)->param_count; ++i) { + for (i = 0; i < mono_method_signature_internal (method)->param_count; ++i) { MonoObject *obj = mono_array_get (typedargs, MonoObject*, i); MonoObject *typedarg; MonoType *t; - t = mono_method_signature (method)->params [i]; + t = mono_method_signature_internal (method)->params [i]; if (t->type == MONO_TYPE_OBJECT && obj) t = m_class_get_byval_arg (obj->vtable->klass); typedarg = create_cattr_typed_arg (t, obj, error); diff --git a/mono/metadata/debug-helpers.c b/mono/metadata/debug-helpers.c index 3d3c6cfb403..3e28837cf7d 100644 --- a/mono/metadata/debug-helpers.c +++ b/mono/metadata/debug-helpers.c @@ -454,9 +454,9 @@ mono_method_desc_match (MonoMethodDesc *desc, MonoMethod *method) return FALSE; if (!desc->args) return TRUE; - if (desc->num_args != mono_method_signature (method)->param_count) + if (desc->num_args != mono_method_signature_internal (method)->param_count) return FALSE; - sig = mono_signature_get_desc (mono_method_signature (method), desc->include_namespace); + sig = mono_signature_get_desc (mono_method_signature_internal (method), desc->include_namespace); if (strcmp (sig, desc->args)) { g_free (sig); return FALSE; diff --git a/mono/metadata/debug-mono-ppdb.c b/mono/metadata/debug-mono-ppdb.c index 5531f5dc333..58fc1539c4c 100644 --- a/mono/metadata/debug-mono-ppdb.c +++ b/mono/metadata/debug-mono-ppdb.c @@ -537,7 +537,7 @@ mono_ppdb_lookup_locals (MonoDebugMethodInfo *minfo) if (!method->token) return NULL; - sig = mono_method_signature (method); + sig = mono_method_signature_internal (method); if (!sig) return NULL; diff --git a/mono/metadata/exception.c b/mono/metadata/exception.c index 6cbe5a8ccf6..09732d93c58 100644 --- a/mono/metadata/exception.c +++ b/mono/metadata/exception.c @@ -188,7 +188,7 @@ create_exception_two_strings (MonoClass *klass, MonoStringHandle a1, MonoStringH if (strcmp (".ctor", mono_method_get_name (m))) continue; - sig = mono_method_signature (m); + sig = mono_method_signature_internal (m); if (sig->param_count != count) continue; @@ -827,7 +827,7 @@ mono_get_exception_type_initialization_handle (const gchar *type_name, MonoExcep iter = NULL; while ((method = mono_class_get_methods (klass, &iter))) { if (!strcmp (".ctor", mono_method_get_name (method))) { - MonoMethodSignature *sig = mono_method_signature (method); + MonoMethodSignature *sig = mono_method_signature_internal (method); if (sig->param_count == 2 && sig->params [0]->type == MONO_TYPE_STRING && mono_class_from_mono_type (sig->params [1]) == mono_defaults.exception_class) break; @@ -1028,7 +1028,7 @@ mono_get_exception_reflection_type_load_checked (MonoArrayHandle types, MonoArra iter = NULL; while ((method = mono_class_get_methods (klass, &iter))) { if (!strcmp (".ctor", mono_method_get_name (method))) { - MonoMethodSignature *sig = mono_method_signature (method); + MonoMethodSignature *sig = mono_method_signature_internal (method); if (sig->param_count == 2 && sig->params [0]->type == MONO_TYPE_SZARRAY && sig->params [1]->type == MONO_TYPE_SZARRAY) break; diff --git a/mono/metadata/icall.c b/mono/metadata/icall.c index 30a57cacb08..ce99333d2f3 100644 --- a/mono/metadata/icall.c +++ b/mono/metadata/icall.c @@ -1995,7 +1995,7 @@ ves_icall_System_MonoMethodInfo_get_retval_marshal (MonoMethod *method, MonoErro MonoDomain *domain = mono_domain_get (); MonoReflectionMarshalAsAttributeHandle res = MONO_HANDLE_NEW (MonoReflectionMarshalAsAttribute, NULL); - MonoMarshalSpec **mspecs = g_new (MonoMarshalSpec*, mono_method_signature (method)->param_count + 1); + MonoMarshalSpec **mspecs = g_new (MonoMarshalSpec*, mono_method_signature_internal (method)->param_count + 1); mono_method_get_marshal_info (method, mspecs); if (mspecs [0]) { @@ -2004,7 +2004,7 @@ ves_icall_System_MonoMethodInfo_get_retval_marshal (MonoMethod *method, MonoErro } leave: - for (int i = mono_method_signature (method)->param_count; i >= 0; i--) + for (int i = mono_method_signature_internal (method)->param_count; i >= 0; i--) if (mspecs [i]) mono_metadata_free_marshal_spec (mspecs [i]); g_free (mspecs); @@ -3251,7 +3251,7 @@ ICALL_EXPORT MonoBoolean ves_icall_MonoMethod_get_IsGenericMethod (MonoReflectionMethodHandle ref_method, MonoError *erro) { MonoMethod *method = MONO_HANDLE_GETVAL (ref_method, method); - return mono_method_signature (method)->generic_param_count != 0; + return mono_method_signature_internal (method)->generic_param_count != 0; } ICALL_EXPORT MonoBoolean @@ -3311,7 +3311,7 @@ ves_icall_MonoMethod_GetGenericArguments (MonoReflectionMethodHandle ref_method, } } - int count = mono_method_signature (method)->generic_param_count; + int count = mono_method_signature_internal (method)->generic_param_count; MonoArrayHandle res = mono_array_new_handle (domain, mono_defaults.systemtype_class, count, error); return_val_if_nok (error, MONO_HANDLE_CAST (MonoArray, NULL_HANDLE)); @@ -3334,7 +3334,7 @@ ves_icall_InternalInvoke (MonoReflectionMethod *method, MonoObject *this_arg, Mo * greater flexibility. */ MonoMethod *m = method->method; - MonoMethodSignature *sig = mono_method_signature (m); + MonoMethodSignature *sig = mono_method_signature_internal (m); MonoImage *image; int pcount; void *obj = this_arg; @@ -3573,7 +3573,7 @@ ves_icall_InternalExecute (MonoReflectionMethod *method, MonoObject *this_arg, M ERROR_DECL (error); MonoDomain *domain = mono_object_domain (method); MonoMethod *m = method->method; - MonoMethodSignature *sig = mono_method_signature (m); + MonoMethodSignature *sig = mono_method_signature_internal (m); MonoArray *out_args; MonoObject *result; int i, j, outarg_count = 0; @@ -4237,7 +4237,7 @@ property_accessor_override (MonoMethod *method1, MonoMethod *method2) method2 = ((MonoMethodInflated*) method2)->declaring; } - return mono_metadata_signature_equal (mono_method_signature (method1), mono_method_signature (method2)); + return mono_metadata_signature_equal (mono_method_signature_internal (method1), mono_method_signature_internal (method2)); } static gboolean @@ -6546,7 +6546,7 @@ ves_icall_System_Delegate_CreateDelegate_internal (MonoReflectionTypeHandle ref_ MonoClass *delegate_class = mono_class_from_mono_type (type); gpointer func; MonoMethod *method = MONO_HANDLE_GETVAL (info, method); - MonoMethodSignature *sig = mono_method_signature(method); + MonoMethodSignature *sig = mono_method_signature_internal (method); mono_class_init_checked (delegate_class, error); return_val_if_nok (error, NULL_HANDLE); @@ -8001,7 +8001,7 @@ ves_icall_ParameterInfo_GetTypeModifiers (MonoReflectionParameterHandle param, M image = m_class_get_image (method->klass); pos = MONO_HANDLE_GETVAL (param, PositionImpl); - sig = mono_method_signature (method); + sig = mono_method_signature_internal (method); if (pos == -1) type = sig->ret; else @@ -8015,10 +8015,10 @@ get_property_type (MonoProperty *prop) { MonoMethodSignature *sig; if (prop->get) { - sig = mono_method_signature (prop->get); + sig = mono_method_signature_internal (prop->get); return sig->ret; } else if (prop->set) { - sig = mono_method_signature (prop->set); + sig = mono_method_signature_internal (prop->set); return sig->params [sig->param_count - 1]; } return NULL; @@ -8425,7 +8425,7 @@ mono_lookup_internal_call_full (MonoMethod *method, gboolean warn_on_missing, mo sigstart = mname + typelen + 2 + mlen; *sigstart = 0; - tmpsig = mono_signature_get_desc (mono_method_signature (method), TRUE); + tmpsig = mono_signature_get_desc (mono_method_signature_internal (method), TRUE); siglen = strlen (tmpsig); if (typelen + mlen + siglen + 6 > sizeof (mname)) { g_free (classname); diff --git a/mono/metadata/loader.c b/mono/metadata/loader.c index 13eecf37ee9..ace92dc1891 100644 --- a/mono/metadata/loader.c +++ b/mono/metadata/loader.c @@ -1569,7 +1569,7 @@ mono_lookup_pinvoke_call (MonoMethod *method, const char **exc_class, const char #ifdef TARGET_WIN32 if (mangle_param_count == 0) - param_count = mono_method_signature (method)->param_count * sizeof (gpointer); + param_count = mono_method_signature_internal (method)->param_count * sizeof (gpointer); else /* Try brute force, since it would be very hard to compute the stack usage correctly */ param_count = mangle_param_count; @@ -2023,7 +2023,7 @@ mono_method_get_param_names (MonoMethod *method, const char **names) if (method->is_inflated) method = ((MonoMethodInflated *) method)->declaring; - signature = mono_method_signature (method); + signature = mono_method_signature_internal (method); /*FIXME this check is somewhat redundant since the caller usally will have to get the signature to figure out the number of arguments and allocate a properly sized array. */ if (signature == NULL) @@ -2047,7 +2047,7 @@ mono_method_get_param_names (MonoMethod *method, const char **names) (MonoReflectionMethodAux *)g_hash_table_lookup ( ((MonoDynamicImage*)m_class_get_image (method->klass))->method_aux_hash, method); if (method_aux && method_aux->param_names) { - for (i = 0; i < mono_method_signature (method)->param_count; ++i) + for (i = 0; i < mono_method_signature_internal (method)->param_count; ++i) if (method_aux->param_names [i + 1]) names [i] = method_aux->param_names [i + 1]; } @@ -2133,7 +2133,7 @@ mono_method_get_marshal_info (MonoMethod *method, MonoMarshalSpec **mspecs) MonoMethodSignature *signature; guint32 idx; - signature = mono_method_signature (method); + signature = mono_method_signature_internal (method); g_assert (signature); /*FIXME there is no way to signal error from this function*/ for (i = 0; i < signature->param_count + 1; ++i) @@ -2204,7 +2204,7 @@ mono_method_has_marshal_info (MonoMethod *method) ((MonoDynamicImage*)m_class_get_image (method->klass))->method_aux_hash, method); MonoMarshalSpec **dyn_specs = method_aux->param_marshall; if (dyn_specs) { - for (i = 0; i < mono_method_signature (method)->param_count + 1; ++i) + for (i = 0; i < mono_method_signature_internal (method)->param_count + 1; ++i) if (dyn_specs [i]) return TRUE; } @@ -2466,7 +2466,7 @@ mono_method_signature_checked (MonoMethod *m, MonoError *error) if (m->is_inflated) { MonoMethodInflated *imethod = (MonoMethodInflated *) m; /* the lock is recursive */ - signature = mono_method_signature (imethod->declaring); + signature = mono_method_signature_internal (imethod->declaring); signature = inflate_generic_signature_checked (m_class_get_image (imethod->declaring->klass), signature, mono_method_get_context (m), error); if (!mono_error_ok (error)) return NULL; @@ -2598,22 +2598,33 @@ mono_method_signature_checked (MonoMethod *m, MonoError *error) } /** + * mono_method_signature_internal: + * \returns the signature of the method \p m. On failure, returns NULL. + */ +MonoMethodSignature* +mono_method_signature_internal (MonoMethod *m) +{ + ERROR_DECL (error); + MonoMethodSignature *sig = mono_method_signature_checked (m, error); + if (sig) + return sig; + char *type_name = mono_type_get_full_name (m->klass); + g_warning ("Could not load signature of %s:%s due to: %s", type_name, m->name, mono_error_get_message (error)); + g_free (type_name); + mono_error_cleanup (error); + return NULL; +} + +/** * mono_method_signature: * \returns the signature of the method \p m. On failure, returns NULL. */ MonoMethodSignature* mono_method_signature (MonoMethod *m) { - ERROR_DECL (error); MonoMethodSignature *sig; MONO_ENTER_GC_UNSAFE; - sig = mono_method_signature_checked (m, error); - if (!sig) { - char *type_name = mono_type_get_full_name (m->klass); - g_warning ("Could not load signature of %s:%s due to: %s", type_name, m->name, mono_error_get_message (error)); - g_free (type_name); - mono_error_cleanup (error); - } + sig = mono_method_signature_internal (m); MONO_EXIT_GC_UNSAFE; return sig; } diff --git a/mono/metadata/loader.h b/mono/metadata/loader.h index 96d00b4fb85..19b8615b4a7 100644 --- a/mono/metadata/loader.h +++ b/mono/metadata/loader.h @@ -35,7 +35,7 @@ mono_method_get_signature_full (MonoMethod *method, MonoImage *image, uint32_t t MONO_API MONO_RT_EXTERNAL_ONLY MonoMethodSignature* mono_method_get_signature (MonoMethod *method, MonoImage *image, uint32_t token); -MONO_API MonoMethodSignature* +MONO_API MONO_RT_EXTERNAL_ONLY MonoMethodSignature* mono_method_signature (MonoMethod *method); MONO_API MONO_RT_EXTERNAL_ONLY MonoMethodHeader* diff --git a/mono/metadata/marshal-ilgen.c b/mono/metadata/marshal-ilgen.c index 7eca5ecda0d..f3e08851f78 100644 --- a/mono/metadata/marshal-ilgen.c +++ b/mono/metadata/marshal-ilgen.c @@ -3941,7 +3941,7 @@ static void emit_synchronized_wrapper_ilgen (MonoMethodBuilder *mb, MonoMethod *method, MonoGenericContext *ctx, MonoGenericContainer *container, MonoMethod *enter_method, MonoMethod *exit_method, MonoMethod *gettypefromhandle_method) { int i, pos, pos2, this_local, taken_local, ret_local = 0; - MonoMethodSignature *sig = mono_method_signature (method); + MonoMethodSignature *sig = mono_method_signature_internal (method); MonoExceptionClause *clause; /* result */ @@ -4035,7 +4035,7 @@ emit_synchronized_wrapper_ilgen (MonoMethodBuilder *mb, MonoMethod *method, Mono static void emit_unbox_wrapper_ilgen (MonoMethodBuilder *mb, MonoMethod *method) { - MonoMethodSignature *sig = mono_method_signature (method); + MonoMethodSignature *sig = mono_method_signature_internal (method); mono_mb_emit_ldarg (mb, 0); mono_mb_emit_icon (mb, MONO_ABI_SIZEOF (MonoObject)); @@ -4080,7 +4080,7 @@ static void emit_thunk_invoke_wrapper_ilgen (MonoMethodBuilder *mb, MonoMethod *method, MonoMethodSignature *csig) { MonoImage *image = get_method_image (method); - MonoMethodSignature *sig = mono_method_signature (method); + MonoMethodSignature *sig = mono_method_signature_internal (method); int param_count = sig->param_count + sig->hasthis + 1; int pos_leave, coop_gc_var, coop_gc_stack_dummy; MonoExceptionClause *clause; @@ -6231,7 +6231,7 @@ emit_native_icall_wrapper_ilgen (MonoMethodBuilder *mb, MonoMethod *method, Mono gboolean uses_handles = FALSE; gboolean save_handles_to_locals = FALSE; IcallHandlesLocal *handles_locals = NULL; - MonoMethodSignature *sig = mono_method_signature (method); + MonoMethodSignature *sig = mono_method_signature_internal (method); (void) mono_lookup_internal_call_full (method, FALSE, &uses_handles); diff --git a/mono/metadata/marshal.c b/mono/metadata/marshal.c index 40c986b5e23..a63cba2a1f2 100644 --- a/mono/metadata/marshal.c +++ b/mono/metadata/marshal.c @@ -155,7 +155,7 @@ register_icall_no_wrapper (gpointer func, const char *name, const char *sigstr) MonoMethodSignature* mono_signature_no_pinvoke (MonoMethod *method) { - MonoMethodSignature *sig = mono_method_signature (method); + MonoMethodSignature *sig = mono_method_signature_internal (method); if (sig->pinvoke) { sig = mono_metadata_signature_dup_full (get_method_image (method), sig); sig->pinvoke = FALSE; @@ -553,16 +553,16 @@ mono_ftnptr_to_delegate_handle (MonoClass *klass, gpointer ftn, MonoError *error memset (&piinfo, 0, sizeof (piinfo)); parse_unmanaged_function_pointer_attr (klass, &piinfo); - mspecs = g_new0 (MonoMarshalSpec*, mono_method_signature (invoke)->param_count + 1); + mspecs = g_new0 (MonoMarshalSpec*, mono_method_signature_internal (invoke)->param_count + 1); mono_method_get_marshal_info (invoke, mspecs); /* Freed below so don't alloc from mempool */ - sig = mono_metadata_signature_dup (mono_method_signature (invoke)); + sig = mono_metadata_signature_dup (mono_method_signature_internal (invoke)); sig->hasthis = 0; wrapper = mono_marshal_get_native_func_wrapper (m_class_get_image (klass), sig, &piinfo, mspecs, ftn); this_obj = MONO_HANDLE_NEW (MonoObject, NULL); - for (i = mono_method_signature (invoke)->param_count; i >= 0; i--) + for (i = mono_method_signature_internal (invoke)->param_count; i >= 0; i--) if (mspecs [i]) mono_metadata_free_marshal_spec (mspecs [i]); g_free (mspecs); @@ -2245,13 +2245,13 @@ mono_marshal_get_delegate_invoke_internal (MonoMethod *method, gboolean callvirt target_class = target_method->klass; } - closed_over_null = sig->param_count == mono_method_signature (target_method)->param_count; + closed_over_null = sig->param_count == mono_method_signature_internal (target_method)->param_count; } if (static_method_with_first_arg_bound) { subtype = WRAPPER_SUBTYPE_DELEGATE_INVOKE_BOUND; g_assert (!callvirt); - invoke_sig = mono_method_signature (target_method); + invoke_sig = mono_method_signature_internal (target_method); } /* @@ -2379,12 +2379,12 @@ mono_marshal_get_delegate_invoke (MonoMethod *method, MonoDelegate *del) sig = mono_signature_no_pinvoke (method); - if (del && !del->target && del->method && mono_method_signature (del->method)->hasthis) { + if (del && !del->target && del->method && mono_method_signature_internal (del->method)->hasthis) { callvirt = TRUE; target_method = del->method; } - if (del && del->method && mono_method_signature (del->method)->param_count == sig->param_count + 1 && (del->method->flags & METHOD_ATTRIBUTE_STATIC)) { + if (del && del->method && mono_method_signature_internal (del->method)->param_count == sig->param_count + 1 && (del->method->flags & METHOD_ATTRIBUTE_STATIC)) { static_method_with_first_arg_bound = TRUE; target_method = del->method; } @@ -2429,11 +2429,11 @@ add_string_ctor_signature (MonoMethod *method) MonoMethodSignature *callsig; CtorSigPair *cs; - callsig = mono_metadata_signature_dup_full (get_method_image (method), mono_method_signature (method)); + callsig = mono_metadata_signature_dup_full (get_method_image (method), mono_method_signature_internal (method)); callsig->ret = m_class_get_byval_arg (mono_defaults.string_class); cs = g_new (CtorSigPair, 1); cs->sig = callsig; - cs->ctor_sig = mono_method_signature (method); + cs->ctor_sig = mono_method_signature_internal (method); mono_marshal_lock (); strsig_list = g_slist_prepend (strsig_list, cs); @@ -2450,7 +2450,7 @@ add_string_ctor_signature (MonoMethod *method) MonoMethodSignature* mono_marshal_get_string_ctor_signature (MonoMethod *method) { - MonoMethodSignature *sig = lookup_string_ctor_signature (mono_method_signature (method)); + MonoMethodSignature *sig = lookup_string_ctor_signature (mono_method_signature_internal (method)); if (!sig) sig = add_string_ctor_signature (method); @@ -2641,17 +2641,17 @@ mono_marshal_get_runtime_invoke_full (MonoMethod *method, gboolean virtual_, gbo return res; if (method->string_ctor) { - callsig = lookup_string_ctor_signature (mono_method_signature (method)); + callsig = lookup_string_ctor_signature (mono_method_signature_internal (method)); if (!callsig) callsig = add_string_ctor_signature (method); } else { if (method_is_dynamic (method)) - callsig = mono_metadata_signature_dup_full (get_method_image (method), mono_method_signature (method)); + callsig = mono_metadata_signature_dup_full (get_method_image (method), mono_method_signature_internal (method)); else - callsig = mono_method_signature (method); + callsig = mono_method_signature_internal (method); } - sig = mono_method_signature (method); + sig = mono_method_signature_internal (method); target_klass = get_wrapper_target_class (m_class_get_image (method->klass)); @@ -2701,7 +2701,7 @@ mono_marshal_get_runtime_invoke_full (MonoMethod *method, gboolean virtual_, gbo MonoType *int_type = mono_get_int_type (); csig->ret = object_type; - if (m_class_is_valuetype (method->klass) && mono_method_signature (method)->hasthis) + if (m_class_is_valuetype (method->klass) && mono_method_signature_internal (method)->hasthis) csig->params [0] = get_runtime_invoke_type (m_class_get_this_arg (method->klass), FALSE); else csig->params [0] = object_type; @@ -3362,7 +3362,7 @@ mono_marshal_get_native_wrapper (MonoMethod *method, gboolean check_exceptions, WrapperInfo *info; g_assert (method != NULL); - g_assert (mono_method_signature (method)->pinvoke); + g_assert (mono_method_signature_internal (method)->pinvoke); GHashTable **cache_ptr; @@ -3396,7 +3396,7 @@ mono_marshal_get_native_wrapper (MonoMethod *method, gboolean check_exceptions, #endif } - sig = mono_method_signature (method); + sig = mono_method_signature_internal (method); if (!(method->iflags & METHOD_IMPL_ATTRIBUTE_INTERNAL_CALL) && (method->flags & METHOD_ATTRIBUTE_PINVOKE_IMPL)) @@ -3428,7 +3428,7 @@ mono_marshal_get_native_wrapper (MonoMethod *method, gboolean check_exceptions, iter = NULL; while ((res = mono_class_get_methods (mono_defaults.string_class, &iter))) { if (!strcmp ("CreateString", res->name) && - mono_metadata_signature_equal (csig, mono_method_signature (res))) { + mono_metadata_signature_equal (csig, mono_method_signature_internal (res))) { WrapperInfo *info; g_assert (!(res->iflags & METHOD_IMPL_ATTRIBUTE_INTERNAL_CALL)); @@ -3621,10 +3621,10 @@ mono_marshal_get_native_func_wrapper_aot (MonoClass *klass) memset (&mpiinfo, 0, sizeof (mpiinfo)); parse_unmanaged_function_pointer_attr (klass, &mpiinfo); - mspecs = g_new0 (MonoMarshalSpec*, mono_method_signature (invoke)->param_count + 1); + mspecs = g_new0 (MonoMarshalSpec*, mono_method_signature_internal (invoke)->param_count + 1); mono_method_get_marshal_info (invoke, mspecs); /* Freed below so don't alloc from mempool */ - sig = mono_metadata_signature_dup (mono_method_signature (invoke)); + sig = mono_metadata_signature_dup (mono_method_signature_internal (invoke)); sig->hasthis = 0; name = g_strdup_printf ("wrapper_aot_native"); @@ -3644,7 +3644,7 @@ mono_marshal_get_native_func_wrapper_aot (MonoClass *klass) info, NULL); mono_mb_free (mb); - for (i = mono_method_signature (invoke)->param_count; i >= 0; i--) + for (i = mono_method_signature_internal (invoke)->param_count; i >= 0; i--) if (mspecs [i]) mono_metadata_free_marshal_spec (mspecs [i]); g_free (mspecs); @@ -3718,7 +3718,7 @@ mono_marshal_set_callconv_from_modopt (MonoMethod *method, MonoMethodSignature * csig->call_convention = MONO_CALL_STDCALL; #endif - sig = mono_method_signature (method); + sig = mono_method_signature_internal (method); MonoCustomModContainer *ret_cmods = NULL; if (sig->ret) @@ -3783,12 +3783,12 @@ mono_marshal_get_managed_wrapper (MonoMethod *method, MonoClass *delegate_klass, return res; invoke = mono_get_delegate_invoke (delegate_klass); - invoke_sig = mono_method_signature (invoke); + invoke_sig = mono_method_signature_internal (invoke); - mspecs = g_new0 (MonoMarshalSpec*, mono_method_signature (invoke)->param_count + 1); + mspecs = g_new0 (MonoMarshalSpec*, mono_method_signature_internal (invoke)->param_count + 1); mono_method_get_marshal_info (invoke, mspecs); - sig = mono_method_signature (method); + sig = mono_method_signature_internal (method); mb = mono_mb_new (method->klass, method->name, MONO_WRAPPER_NATIVE_TO_MANAGED); @@ -3902,7 +3902,7 @@ mono_marshal_get_managed_wrapper (MonoMethod *method, MonoClass *delegate_klass, } mono_mb_free (mb); - for (i = mono_method_signature (invoke)->param_count; i >= 0; i--) + for (i = mono_method_signature_internal (invoke)->param_count; i >= 0; i--) if (mspecs [i]) mono_metadata_free_marshal_spec (mspecs [i]); g_free (mspecs); @@ -3938,7 +3938,7 @@ mono_marshal_get_vtfixup_ftnptr (MonoImage *image, guint32 token, guint16 type) MonoMarshalSpec **mspecs; EmitMarshalContext m; - sig = mono_method_signature (method); + sig = mono_method_signature_internal (method); g_assert (!sig->hasthis); mspecs = g_new0 (MonoMarshalSpec*, sig->param_count + 1); @@ -3977,7 +3977,7 @@ mono_marshal_get_vtfixup_ftnptr (MonoImage *image, guint32 token, guint16 type) return compiled_ptr; } - sig = mono_method_signature (method); + sig = mono_method_signature_internal (method); mb = mono_mb_new (method->klass, method->name, MONO_WRAPPER_MANAGED_TO_MANAGED); param_count = sig->param_count + sig->hasthis; @@ -4246,7 +4246,7 @@ mono_marshal_get_synchronized_inner_wrapper (MonoMethod *method) get_marshal_cb ()->mb_emit_exception (mb, "System", "ExecutionEngineException", "Shouldn't be called."); get_marshal_cb ()->mb_emit_byte (mb, CEE_RET); - sig = mono_metadata_signature_dup_full (get_method_image (method), mono_method_signature (method)); + sig = mono_metadata_signature_dup_full (get_method_image (method), mono_method_signature_internal (method)); info = mono_wrapper_info_create (mb, WRAPPER_SUBTYPE_SYNCHRONIZED_INNER); info->d.synchronized_inner.method = method; @@ -4319,7 +4319,7 @@ mono_marshal_get_synchronized_wrapper (MonoMethod *method) return res; } - sig = mono_metadata_signature_dup_full (get_method_image (method), mono_method_signature (method)); + sig = mono_metadata_signature_dup_full (get_method_image (method), mono_method_signature_internal (method)); sig->pinvoke = 0; mb = mono_mb_new (method->klass, method->name, MONO_WRAPPER_SYNCHRONIZED); @@ -4378,7 +4378,7 @@ emit_unbox_wrapper_noilgen (MonoMethodBuilder *mb, MonoMethod *method) MonoMethod * mono_marshal_get_unbox_wrapper (MonoMethod *method) { - MonoMethodSignature *sig = mono_method_signature (method); + MonoMethodSignature *sig = mono_method_signature_internal (method); MonoMethodBuilder *mb; MonoMethod *res; GHashTable *cache; @@ -4815,7 +4815,7 @@ mono_marshal_get_array_accessor_wrapper (MonoMethod *method) return res; } - sig = mono_metadata_signature_dup_full (get_method_image (method), mono_method_signature (method)); + sig = mono_metadata_signature_dup_full (get_method_image (method), mono_method_signature_internal (method)); sig->pinvoke = 0; mb = mono_mb_new (method->klass, method->name, MONO_WRAPPER_UNKNOWN); @@ -6022,7 +6022,7 @@ mono_marshal_get_generic_array_helper (MonoClass *klass, const gchar *name, Mono mb->method->flags = METHOD_ATTRIBUTE_PRIVATE | METHOD_ATTRIBUTE_VIRTUAL | METHOD_ATTRIBUTE_NEW_SLOT | METHOD_ATTRIBUTE_HIDE_BY_SIG | METHOD_ATTRIBUTE_FINAL; - sig = mono_method_signature (method); + sig = mono_method_signature_internal (method); csig = mono_metadata_signature_dup_full (get_method_image (method), sig); csig->generic_param_count = 0; @@ -6128,7 +6128,7 @@ mono_marshal_get_thunk_invoke_wrapper (MonoMethod *method) MonoType *object_type = mono_get_object_type (); - sig = mono_method_signature (method); + sig = mono_method_signature_internal (method); mb = mono_mb_new (klass, method->name, MONO_WRAPPER_NATIVE_TO_MANAGED); /* add "this" and exception param */ @@ -6193,7 +6193,7 @@ mono_marshal_free_dynamic_wrappers (MonoMethod *method) g_hash_table_foreach_remove (image->wrapper_caches.delegate_abstract_invoke_cache, signature_pointer_pair_matches_pointer, method); // FIXME: Need to clear the caches in other images as well if (image->delegate_bound_static_invoke_cache) - g_hash_table_remove (image->delegate_bound_static_invoke_cache, mono_method_signature (method)); + g_hash_table_remove (image->delegate_bound_static_invoke_cache, mono_method_signature_internal (method)); if (marshal_mutex_initialized) mono_marshal_unlock (); diff --git a/mono/metadata/metadata-verify.c b/mono/metadata/metadata-verify.c index 60fab34f29a..2fc6f807c0b 100644 --- a/mono/metadata/metadata-verify.c +++ b/mono/metadata/metadata-verify.c @@ -4317,7 +4317,7 @@ mono_verifier_is_sig_compatible (MonoImage *image, MonoMethod *method, MonoMetho if (!mono_verifier_is_enabled_for_image (image)) return TRUE; - original_sig = mono_method_signature (method); + original_sig = mono_method_signature_internal (method); if (original_sig->call_convention == MONO_CALL_VARARG) { if (original_sig->hasthis != signature->hasthis) return FALSE; diff --git a/mono/metadata/metadata.c b/mono/metadata/metadata.c index dd60122fb66..2ac210a8a43 100644 --- a/mono/metadata/metadata.c +++ b/mono/metadata/metadata.c @@ -2918,7 +2918,7 @@ collect_method_images (MonoMethodInflated *method, CollectData *data) * Dynamic assemblies have no references, so the images they depend on can be unloaded before them. */ if (image_is_dynamic (m_class_get_image (m->klass))) - collect_signature_images (mono_method_signature (m), data); + collect_signature_images (mono_method_signature_internal (m), data); } static void @@ -2997,7 +2997,7 @@ inflated_method_in_image (gpointer key, gpointer value, gpointer data) // https://bugzilla.novell.com/show_bug.cgi?id=458168 g_assert (m_class_get_image (method->declaring->klass) == image || (method->context.class_inst && ginst_in_image (method->context.class_inst, image)) || - (method->context.method_inst && ginst_in_image (method->context.method_inst, image)) || (((MonoMethod*)method)->signature && signature_in_image (mono_method_signature ((MonoMethod*)method), image))); + (method->context.method_inst && ginst_in_image (method->context.method_inst, image)) || (((MonoMethod*)method)->signature && signature_in_image (mono_method_signature_internal ((MonoMethod*)method), image))); return TRUE; } @@ -3035,7 +3035,7 @@ check_gmethod (gpointer key, gpointer value, gpointer data) if (method->context.method_inst) g_assert (!ginst_in_image (method->context.method_inst, image)); if (((MonoMethod*)method)->signature) - g_assert (!signature_in_image (mono_method_signature ((MonoMethod*)method), image)); + g_assert (!signature_in_image (mono_method_signature_internal ((MonoMethod*)method), image)); } /* diff --git a/mono/metadata/object.c b/mono/metadata/object.c index 24e4d0177b1..0e10bf64fbc 100644 --- a/mono/metadata/object.c +++ b/mono/metadata/object.c @@ -1245,7 +1245,7 @@ mono_method_get_imt_slot (MonoMethod *method) if (method->is_inflated) method = ((MonoMethodInflated*)method)->declaring; - sig = mono_method_signature (method); + sig = mono_method_signature_internal (method); hashes_count = sig->param_count + 4; hashes_start = (guint32 *)g_malloc (hashes_count * sizeof (guint32)); hashes = hashes_start; @@ -2910,11 +2910,11 @@ mono_class_get_virtual_method (MonoClass *klass, MonoMethod *method, gboolean is #ifndef DISABLE_REMOTING if (is_proxy) { /* It may be an interface, abstract class method or generic method */ - if (!res || mono_method_signature (res)->generic_param_count) + if (!res || mono_method_signature_internal (res)->generic_param_count) res = method; /* generic methods demand invoke_with_check */ - if (mono_method_signature (res)->generic_param_count) + if (mono_method_signature_internal (res)->generic_param_count) res = mono_marshal_get_remoting_invoke_with_check (res, error); else { #ifndef DISABLE_COM @@ -4452,7 +4452,7 @@ prepare_run_main (MonoMethod *method, int argc, char *argv[]) argc--; argv++; - sig = mono_method_signature (method); + sig = mono_method_signature_internal (method); if (!sig) { g_print ("Unable to load Main method.\n"); exit (-1); @@ -4953,7 +4953,7 @@ do_exec_main_checked (MonoMethod *method, MonoArray *args, MonoError *error) pa [0] = args; /* FIXME: check signature of method */ - if (mono_method_signature (method)->ret->type == MONO_TYPE_I4) { + if (mono_method_signature_internal (method)->ret->type == MONO_TYPE_I4) { MonoObject *res; res = mono_runtime_invoke_checked (method, NULL, pa, error); if (is_ok (error)) @@ -4987,7 +4987,7 @@ do_try_exec_main (MonoMethod *method, MonoArray *args, MonoObject **exc) pa [0] = args; /* FIXME: check signature of method */ - if (mono_method_signature (method)->ret->type == MONO_TYPE_I4) { + if (mono_method_signature_internal (method)->ret->type == MONO_TYPE_I4) { ERROR_DECL_VALUE (inner_error); MonoObject *res; res = mono_runtime_try_invoke (method, NULL, pa, exc, &inner_error); @@ -5326,7 +5326,7 @@ mono_runtime_try_invoke_array (MonoMethod *method, void *obj, MonoArray *params, error_init (error); - MonoMethodSignature *sig = mono_method_signature (method); + MonoMethodSignature *sig = mono_method_signature_internal (method); gpointer *pa = NULL; MonoObject *res; int i; @@ -8146,7 +8146,7 @@ mono_message_invoke (MonoObject *target, MonoMethodMessage *msg, domain = mono_domain_get (); method = msg->method->method; - sig = mono_method_signature (method); + sig = mono_method_signature_internal (method); for (i = 0; i < sig->param_count; i++) { if (sig->params [i]->byref) @@ -8452,7 +8452,7 @@ mono_method_call_message_new (MonoMethod *method, gpointer *params, MonoMethod * error_init (error); MonoDomain *domain = mono_domain_get (); - MonoMethodSignature *sig = mono_method_signature (method); + MonoMethodSignature *sig = mono_method_signature_internal (method); MonoMethodMessage *msg; int i, count; @@ -8515,7 +8515,7 @@ mono_method_return_message_restore (MonoMethod *method, gpointer *params, MonoAr error_init (error); - MonoMethodSignature *sig = mono_method_signature (method); + MonoMethodSignature *sig = mono_method_signature_internal (method); int i, j, type, size, out_len; if (out_args == NULL) diff --git a/mono/metadata/reflection.c b/mono/metadata/reflection.c index e429740e2de..6478218bf78 100644 --- a/mono/metadata/reflection.c +++ b/mono/metadata/reflection.c @@ -1334,7 +1334,7 @@ get_default_param_value_blobs (MonoMethod *method, char **blobs, guint32 *types) MonoClass *klass = method->klass; MonoImage *image = m_class_get_image (klass); - MonoMethodSignature *methodsig = mono_method_signature (method); + MonoMethodSignature *methodsig = mono_method_signature_internal (method); MonoTableInfo *constt; MonoTableInfo *methodt; @@ -2502,7 +2502,7 @@ reflection_bind_generic_method_parameters (MonoMethod *method, MonoArrayHandle t if (method->is_inflated) method = ((MonoMethodInflated *) method)->declaring; - int count = mono_method_signature (method)->generic_param_count; + int count = mono_method_signature_internal (method)->generic_param_count; if (count != mono_array_handle_length (types)) { mono_error_set_argument (error, "typeArguments", "Incorrect number of generic arguments"); return NULL; diff --git a/mono/metadata/remoting.c b/mono/metadata/remoting.c index 345a00454d0..04289df234f 100644 --- a/mono/metadata/remoting.c +++ b/mono/metadata/remoting.c @@ -405,7 +405,7 @@ mono_remoting_wrapper (MonoMethod *method, gpointer *params) if (mono_class_is_contextbound (this_obj->remote_class->proxy_class) && this_obj->rp->context == (MonoObject *) mono_context_get ()) { int i; - MonoMethodSignature *sig = mono_method_signature (method); + MonoMethodSignature *sig = mono_method_signature_internal (method); int count = sig->param_count; gpointer* mparams = g_newa (gpointer, count); @@ -722,7 +722,7 @@ mono_marshal_get_xappdomain_dispatch (MonoMethod *method, int *marshal_types, in if ((res = mono_marshal_remoting_find_in_cache (method, MONO_WRAPPER_XDOMAIN_DISPATCH))) return res; - sig = mono_method_signature (method); + sig = mono_method_signature_internal (method); copy_return = (sig->ret->type != MONO_TYPE_VOID && ret_marshal_type != MONO_MARSHAL_SERIALIZE); j = 0; @@ -995,7 +995,7 @@ mono_marshal_get_xappdomain_invoke (MonoMethod *method, MonoError *error) return method; /* we cant remote methods without this pointer */ - if (!mono_method_signature (method)->hasthis) + if (!mono_method_signature_internal (method)->hasthis) return method; mono_remoting_marshal_init (); @@ -1187,7 +1187,7 @@ mono_marshal_get_xappdomain_invoke (MonoMethod *method, MonoError *error) xdomain_method = mono_marshal_get_xappdomain_dispatch (method, marshal_types, complex_count, complex_out_count, ret_marshal_type); mono_marshal_emit_load_domain_method (mb, xdomain_method); - mono_mb_emit_calli (mb, mono_method_signature (xdomain_method)); + mono_mb_emit_calli (mb, mono_method_signature_internal (xdomain_method)); if (copy_return) mono_mb_emit_stloc (mb, loc_return); @@ -1363,7 +1363,7 @@ mono_marshal_get_remoting_invoke_with_check (MonoMethod *method, MonoError *erro return method; /* we cant remote methods without this pointer */ - g_assert (mono_method_signature (method)->hasthis); + g_assert (mono_method_signature_internal (method)->hasthis); if ((res = mono_marshal_remoting_find_in_cache (method, MONO_WRAPPER_REMOTING_INVOKE_WITH_CHECK))) return res; @@ -1389,7 +1389,7 @@ mono_marshal_get_remoting_invoke_with_check (MonoMethod *method, MonoError *erro mono_mb_free (mb); return NULL; } - mono_mb_emit_managed_call (mb, native, mono_method_signature (native)); + mono_mb_emit_managed_call (mb, native, mono_method_signature_internal (native)); mono_mb_emit_byte (mb, CEE_RET); mono_mb_patch_branch (mb, pos_rem); @@ -1400,12 +1400,12 @@ mono_marshal_get_remoting_invoke_with_check (MonoMethod *method, MonoError *erro mono_mb_free (mb); return NULL; } - mono_mb_emit_managed_call (mb, native, mono_method_signature (native)); + mono_mb_emit_managed_call (mb, native, mono_method_signature_internal (native)); mono_mb_emit_byte (mb, CEE_RET); /* not a proxy */ mono_mb_patch_branch (mb, pos); - mono_mb_emit_managed_call (mb, method, mono_method_signature (method)); + mono_mb_emit_managed_call (mb, method, mono_method_signature_internal (method)); mono_mb_emit_byte (mb, CEE_RET); #endif diff --git a/mono/metadata/security-core-clr.c b/mono/metadata/security-core-clr.c index 676d978575e..b36cf6886b1 100644 --- a/mono/metadata/security-core-clr.c +++ b/mono/metadata/security-core-clr.c @@ -223,7 +223,7 @@ get_default_ctor (MonoClass *klass) continue; if ((method->name[0] != '.') || strcmp (".ctor", method->name)) continue; - sig = mono_method_signature (method); + sig = mono_method_signature_internal (method); if (sig && (sig->param_count == 0)) return method; } diff --git a/mono/metadata/sre-save.c b/mono/metadata/sre-save.c index 3745b716d63..de16d9af0e1 100644 --- a/mono/metadata/sre-save.c +++ b/mono/metadata/sre-save.c @@ -1812,7 +1812,7 @@ fixup_method (MonoReflectionILGen *ilgen, gpointer value, MonoDynamicImage *asse case MONO_TABLE_METHODSPEC: if (!strcmp (iltoken_member_class_name, "MonoMethod")) { MonoMethod *m = ((MonoReflectionMethod*)iltoken->member)->method; - g_assert (mono_method_signature (m)->generic_param_count); + g_assert (mono_method_signature_internal (m)->generic_param_count); continue; } else if (!strcmp (iltoken_member_class_name, "MethodBuilder")) { g_assert_not_reached (); diff --git a/mono/metadata/sre.c b/mono/metadata/sre.c index b4e5ddd4a8f..bb674377961 100644 --- a/mono/metadata/sre.c +++ b/mono/metadata/sre.c @@ -685,7 +685,7 @@ mono_image_get_methodref_token (MonoDynamicImage *assembly, MonoMethod *method, /* * A methodref signature can't contain an unmanaged calling convention. */ - sig = mono_metadata_signature_dup (mono_method_signature (method)); + sig = mono_metadata_signature_dup (mono_method_signature_internal (method)); if ((sig->call_convention != MONO_CALL_DEFAULT) && (sig->call_convention != MONO_CALL_VARARG)) sig->call_convention = MONO_CALL_DEFAULT; token = mono_image_get_memberref_token (assembly, m_class_get_byval_arg (method->klass), @@ -805,10 +805,10 @@ method_encode_methodspec (MonoDynamicImage *assembly, MonoMethod *method) imethod = (MonoMethodInflated *) method; declaring = imethod->declaring; - sig = mono_dynimage_encode_method_signature (assembly, mono_method_signature (declaring)); + sig = mono_dynimage_encode_method_signature (assembly, mono_method_signature_internal (declaring)); mtoken = mono_image_get_memberref_token (assembly, m_class_get_byval_arg (method->klass), declaring->name, sig); - if (!mono_method_signature (declaring)->generic_param_count) + if (!mono_method_signature_internal (declaring)->generic_param_count) return mtoken; switch (mono_metadata_token_table (mtoken)) { @@ -850,11 +850,11 @@ mono_image_get_methodspec_token (MonoDynamicImage *assembly, MonoMethod *method) g_assert (method->is_inflated); imethod = (MonoMethodInflated *) method; - if (mono_method_signature (imethod->declaring)->generic_param_count) { + if (mono_method_signature_internal (imethod->declaring)->generic_param_count) { token = method_encode_methodspec (assembly, method); } else { guint32 sig = mono_dynimage_encode_method_signature ( - assembly, mono_method_signature (imethod->declaring)); + assembly, mono_method_signature_internal (imethod->declaring)); token = mono_image_get_memberref_token ( assembly, m_class_get_byval_arg (method->klass), method->name, sig); } @@ -869,7 +869,7 @@ mono_image_get_inflated_method_token (MonoDynamicImage *assembly, MonoMethod *m) MonoMethodInflated *imethod = (MonoMethodInflated *) m; guint32 sig, token; - sig = mono_dynimage_encode_method_signature (assembly, mono_method_signature (imethod->declaring)); + sig = mono_dynimage_encode_method_signature (assembly, mono_method_signature_internal (imethod->declaring)); token = mono_image_get_memberref_token ( assembly, m_class_get_byval_arg (m->klass), m->name, sig); @@ -1060,7 +1060,7 @@ create_method_token (MonoDynamicImage *assembly, MonoMethod *method, MonoArrayHa int nargs = mono_array_handle_length (opt_param_types); - MonoMethodSignature *old = mono_method_signature (method); + MonoMethodSignature *old = mono_method_signature_internal (method); MonoMethodSignature *sig = mono_metadata_signature_alloc ( &assembly->image, old->param_count + nargs); sig->hasthis = old->hasthis; @@ -1108,7 +1108,7 @@ mono_image_create_method_token (MonoDynamicImage *assembly, MonoObjectHandle obj if (strcmp (klass->name, "MonoMethod") == 0 || strcmp (klass->name, "MonoCMethod") == 0) { MonoReflectionMethodHandle ref_method = MONO_HANDLE_CAST (MonoReflectionMethod, obj); MonoMethod *method = MONO_HANDLE_GETVAL (ref_method, method); - g_assert (!MONO_HANDLE_IS_NULL (opt_param_types) && (mono_method_signature (method)->sentinelpos >= 0)); + g_assert (!MONO_HANDLE_IS_NULL (opt_param_types) && (mono_method_signature_internal (method)->sentinelpos >= 0)); token = create_method_token (assembly, method, opt_param_types, error); goto_if_nok (error, fail); } else if (strcmp (klass->name, "MethodBuilder") == 0) { @@ -1993,9 +1993,9 @@ get_prop_name_and_type (MonoObject *prop, char **name, MonoType **type, MonoErro MonoReflectionProperty *p = (MonoReflectionProperty *)prop; *name = g_strdup (p->property->name); if (p->property->get) - *type = mono_method_signature (p->property->get)->ret; + *type = mono_method_signature_internal (p->property->get)->ret; else - *type = mono_method_signature (p->property->set)->params [mono_method_signature (p->property->set)->param_count - 1]; + *type = mono_method_signature_internal (p->property->set)->params [mono_method_signature_internal (p->property->set)->param_count - 1]; } } @@ -2460,7 +2460,7 @@ mono_reflection_get_custom_attrs_blob_checked (MonoReflectionAssembly *assembly, return NULL; } } else { - sig = mono_method_signature (((MonoReflectionMethod*)ctor)->method); + sig = mono_method_signature_internal (((MonoReflectionMethod*)ctor)->method); } g_assert (mono_array_length (ctorArgs) == sig->param_count); @@ -3110,7 +3110,7 @@ reflection_methodbuilder_to_mono_method (MonoClass *klass, if (rmb->pinfo) { if (!method_aux) method_aux = image_g_new0 (image, MonoReflectionMethodAux, 1); - method_aux->param_names = image_g_new0 (image, char *, mono_method_signature (m)->param_count + 1); + method_aux->param_names = image_g_new0 (image, char *, mono_method_signature_internal (m)->param_count + 1); for (i = 0; i <= m->signature->param_count; ++i) { MonoReflectionParamBuilder *pb; if ((pb = mono_array_get (rmb->pinfo, MonoReflectionParamBuilder*, i))) { diff --git a/mono/metadata/verify.c b/mono/metadata/verify.c index ac0f0729357..5cf2111902d 100644 --- a/mono/metadata/verify.c +++ b/mono/metadata/verify.c @@ -374,7 +374,7 @@ mono_type_create_fnptr_from_mono_method (VerifyContext *ctx, MonoMethod *method) _MEM_ALLOC (sizeof (MonoType)); //FIXME use mono_method_get_signature_full - res->data.method = mono_method_signature (method); + res->data.method = mono_method_signature_internal (method); res->type = MONO_TYPE_FNPTR; ctx->funptrs = g_slist_prepend (ctx->funptrs, res); return res; @@ -467,8 +467,8 @@ mono_class_has_default_constructor (MonoClass *klass) for (i = 0; i < mcount; ++i) { method = klass_methods [i]; if (mono_method_is_constructor (method) && - mono_method_signature (method) && - mono_method_signature (method)->param_count == 0 && + mono_method_signature_internal (method) && + mono_method_signature_internal (method)->param_count == 0 && (method->flags & METHOD_ATTRIBUTE_MEMBER_ACCESS_MASK) == METHOD_ATTRIBUTE_PUBLIC) return TRUE; } @@ -2749,14 +2749,14 @@ verify_delegate_compatibility (VerifyContext *ctx, MonoClass *delegate, ILStackD invoke = mono_get_delegate_invoke (delegate); method = funptr->method; - if (!method || !mono_method_signature (method)) { + if (!method || !mono_method_signature_internal (method)) { char *name = mono_type_get_full_name (delegate); ADD_VERIFY_ERROR (ctx, g_strdup_printf ("Invalid method on stack to create delegate %s construction at 0x%04x", name, ctx->ip_offset)); g_free (name); return; } - if (!invoke || !mono_method_signature (invoke)) { + if (!invoke || !mono_method_signature_internal (invoke)) { char *name = mono_type_get_full_name (delegate); ADD_VERIFY_ERROR (ctx, g_strdup_printf ("Delegate type %s with bad Invoke method at 0x%04x", name, ctx->ip_offset)); g_free (name); @@ -2766,11 +2766,11 @@ verify_delegate_compatibility (VerifyContext *ctx, MonoClass *delegate, ILStackD is_static_ldftn = (ip_offset > 5 && IS_LOAD_FUN_PTR (CEE_LDFTN)) && method->flags & METHOD_ATTRIBUTE_STATIC; if (is_static_ldftn) - is_first_arg_bound = mono_method_signature (invoke)->param_count + 1 == mono_method_signature (method)->param_count; + is_first_arg_bound = mono_method_signature_internal (invoke)->param_count + 1 == mono_method_signature_internal (method)->param_count; - if (!mono_delegate_signature_equal (mono_method_signature (invoke), mono_method_signature (method), is_first_arg_bound)) { - char *fun_sig = mono_signature_get_desc (mono_method_signature (method), FALSE); - char *invoke_sig = mono_signature_get_desc (mono_method_signature (invoke), FALSE); + if (!mono_delegate_signature_equal (mono_method_signature_internal (invoke), mono_method_signature_internal (method), is_first_arg_bound)) { + char *fun_sig = mono_signature_get_desc (mono_method_signature_internal (method), FALSE); + char *invoke_sig = mono_signature_get_desc (mono_method_signature_internal (invoke), FALSE); CODE_NOT_VERIFIABLE (ctx, g_strdup_printf ("Function pointer signature '%s' doesn't match delegate's signature '%s' at 0x%04x", fun_sig, invoke_sig, ctx->ip_offset)); g_free (fun_sig); g_free (invoke_sig); @@ -2798,7 +2798,7 @@ verify_delegate_compatibility (VerifyContext *ctx, MonoClass *delegate, ILStackD //general tests if (is_first_arg_bound) { - if (mono_method_signature (method)->param_count == 0 || !verify_stack_type_compatibility_full (ctx, mono_method_signature (method)->params [0], value, FALSE, TRUE)) + if (mono_method_signature_internal (method)->param_count == 0 || !verify_stack_type_compatibility_full (ctx, mono_method_signature_internal (method)->params [0], value, FALSE, TRUE)) CODE_NOT_VERIFIABLE (ctx, g_strdup_printf ("This object not compatible with function pointer for delegate creation at 0x%04x", ctx->ip_offset)); } else { if (method->flags & METHOD_ATTRIBUTE_STATIC) { @@ -3366,7 +3366,7 @@ do_invoke_method (VerifyContext *ctx, int method_token, gboolean virtual_) } if ((ctx->prefix_set & PREFIX_TAIL)) { - if (!mono_delegate_ret_equal (mono_method_signature (ctx->method)->ret, sig->ret)) + if (!mono_delegate_ret_equal (mono_method_signature_internal (ctx->method)->ret, sig->ret)) CODE_NOT_VERIFIABLE (ctx, g_strdup_printf ("Tail call with incompatible return type at 0x%04x", ctx->ip_offset)); if (ctx->header->code [ctx->ip_offset + 5] != CEE_RET) CODE_NOT_VERIFIABLE (ctx, g_strdup_printf ("Tail call not followed by ret at 0x%04x", ctx->ip_offset)); @@ -3906,7 +3906,7 @@ do_newobj (VerifyContext *ctx, int token) } //FIXME use mono_method_get_signature_full - sig = mono_method_signature (method); + sig = mono_method_signature_internal (method); if (!sig) { ADD_VERIFY_ERROR (ctx, g_strdup_printf ("Invalid constructor signature to newobj at 0x%04x", ctx->ip_offset)); return; @@ -4941,7 +4941,7 @@ mono_method_verify (MonoMethod *method, int level) memset (&ctx, 0, sizeof (VerifyContext)); //FIXME use mono_method_get_signature_full - ctx.signature = mono_method_signature (method); + ctx.signature = mono_method_signature_internal (method); if (!ctx.signature) { ADD_VERIFY_ERROR (&ctx, g_strdup_printf ("Could not decode method signature")); diff --git a/mono/mini/aot-compiler.c b/mono/mini/aot-compiler.c index da3822fb324..eefaddd181f 100644 --- a/mono/mini/aot-compiler.c +++ b/mono/mini/aot-compiler.c @@ -3439,7 +3439,7 @@ encode_method_ref (MonoAotCompile *acfg, MonoMethod *method, guint8 *buf, guint8 encode_value (1, p, &p); encode_klass_ref (acfg, method->klass, p, &p); } else { - MonoMethodSignature *sig = mono_method_signature (method); + MonoMethodSignature *sig = mono_method_signature_internal (method); WrapperInfo *info = mono_marshal_get_wrapper_info (method); encode_value (0, p, &p); @@ -3458,7 +3458,7 @@ encode_method_ref (MonoAotCompile *acfg, MonoMethod *method, guint8 *buf, guint8 default: g_assert_not_reached (); } - } else if (mono_method_signature (method)->is_inflated) { + } else if (mono_method_signature_internal (method)->is_inflated) { /* * This is a generic method, find the original token which referenced it and * encode that. @@ -3517,9 +3517,9 @@ encode_method_ref (MonoAotCompile *acfg, MonoMethod *method, guint8 *buf, guint8 /* Encode directly */ encode_value ((MONO_AOT_METHODREF_ARRAY << 24), p, &p); encode_klass_ref (acfg, method->klass, p, &p); - if (!strcmp (method->name, ".ctor") && mono_method_signature (method)->param_count == m_class_get_rank (method->klass)) + if (!strcmp (method->name, ".ctor") && mono_method_signature_internal (method)->param_count == m_class_get_rank (method->klass)) encode_value (0, p, &p); - else if (!strcmp (method->name, ".ctor") && mono_method_signature (method)->param_count == m_class_get_rank (method->klass) * 2) + else if (!strcmp (method->name, ".ctor") && mono_method_signature_internal (method)->param_count == m_class_get_rank (method->klass) * 2) encode_value (1, p, &p); else if (!strcmp (method->name, "Get")) encode_value (2, p, &p); @@ -4051,7 +4051,7 @@ add_wrappers (MonoAotCompile *acfg) skip = TRUE; /* Skip methods which can not be handled by get_runtime_invoke () */ - sig = mono_method_signature (method); + sig = mono_method_signature_internal (method); if (!sig) continue; if ((sig->ret->type == MONO_TYPE_PTR) || @@ -4237,7 +4237,7 @@ add_wrappers (MonoAotCompile *acfg) method = mono_get_method_checked (acfg->image, token, NULL, NULL, error); g_assert (mono_error_ok (error)); /* FIXME don't swallow the error */ - sig = mono_method_signature (method); + sig = mono_method_signature_internal (method); if (sig->hasthis && (method->klass->marshalbyref || method->klass == mono_defaults.object_class)) { m = mono_marshal_get_remoting_invoke_with_check (method); @@ -4447,7 +4447,7 @@ add_wrappers (MonoAotCompile *acfg) if (method->iflags & METHOD_IMPL_ATTRIBUTE_INTERNAL_CALL) { if (acfg->aot_opts.llvm_only) { /* The wrappers have a different signature (hasthis is not set) so need to add this too */ - add_gsharedvt_wrappers (acfg, mono_method_signature (method), FALSE, TRUE, FALSE); + add_gsharedvt_wrappers (acfg, mono_method_signature_internal (method), FALSE, TRUE, FALSE); } } } @@ -4481,7 +4481,7 @@ add_wrappers (MonoAotCompile *acfg) break; if (j < cattr->num_attrs) { MonoCustomAttrEntry *e = &cattr->attrs [j]; - MonoMethodSignature *sig = mono_method_signature (e->ctor); + MonoMethodSignature *sig = mono_method_signature_internal (e->ctor); const char *p = (const char*)e->data; const char *named; int slen, num_named, named_type; @@ -4993,7 +4993,7 @@ add_types_from_method_header (MonoAotCompile *acfg, MonoMethod *method) depth = GPOINTER_TO_UINT (g_hash_table_lookup (acfg->method_depth, method)); - sig = mono_method_signature (method); + sig = mono_method_signature_internal (method); if (sig) { for (j = 0; j < sig->param_count; ++j) @@ -6647,7 +6647,7 @@ emit_klass_info (MonoAotCompile *acfg, guint32 token) for (i = 0; i < m_class_get_vtable_size (klass); ++i) { MonoMethod *cm = klass_vtable [i]; - if (cm && mono_method_signature (cm)->is_inflated && !g_hash_table_lookup (acfg->token_info_hash, cm)) + if (cm && mono_method_signature_internal (cm)->is_inflated && !g_hash_table_lookup (acfg->token_info_hash, cm)) cant_encode = TRUE; } @@ -8169,7 +8169,7 @@ compile_method (MonoAotCompile *acfg, MonoMethod *method) if (!cfg->method->wrapper_type || cfg->method->wrapper_type == MONO_WRAPPER_DELEGATE_INVOKE) /* These only need out wrappers */ - add_gsharedvt_wrappers (acfg, mono_method_signature (cfg->method), FALSE, TRUE, FALSE); + add_gsharedvt_wrappers (acfg, mono_method_signature_internal (cfg->method), FALSE, TRUE, FALSE); for (l = cfg->signatures; l; l = l->next) { MonoMethodSignature *sig = mono_metadata_signature_dup ((MonoMethodSignature*)l->data); @@ -8180,7 +8180,7 @@ compile_method (MonoAotCompile *acfg, MonoMethod *method) } else if (mono_aot_mode_is_full (&acfg->aot_opts) && mono_aot_mode_is_interp (&acfg->aot_opts)) { /* The interpreter uses these wrappers to call aot-ed code */ if (!cfg->method->wrapper_type || cfg->method->wrapper_type == MONO_WRAPPER_DELEGATE_INVOKE) - add_gsharedvt_wrappers (acfg, mono_method_signature (cfg->method), FALSE, TRUE, TRUE); + add_gsharedvt_wrappers (acfg, mono_method_signature_internal (cfg->method), FALSE, TRUE, TRUE); } /* @@ -8222,7 +8222,7 @@ compile_method (MonoAotCompile *acfg, MonoMethod *method) MonoMethodHeader *header; int i; - sig = mono_method_signature (method); + sig = mono_method_signature_internal (method); args = (MonoInst **)mono_mempool_alloc (acfg->mempool, sizeof (MonoInst*) * (sig->param_count + sig->hasthis)); for (i = 0; i < sig->param_count + sig->hasthis; ++i) { args [i] = (MonoInst *)mono_mempool_alloc (acfg->mempool, sizeof (MonoInst)); @@ -8801,7 +8801,7 @@ append_mangled_wrapper (GString *s, MonoMethod *method) default: g_assert_not_reached (); } - return success && append_mangled_signature (s, mono_method_signature (method)); + return success && append_mangled_signature (s, mono_method_signature_internal (method)); } static void @@ -8881,12 +8881,12 @@ append_mangled_method (GString *s, MonoMethod *method) g_string_append_printf (s, "_%s"); append_mangled_context (s, &container->context); - return append_mangled_signature (s, mono_method_signature (method)); + return append_mangled_signature (s, mono_method_signature_internal (method)); } else { g_string_append_printf (s, "_"); append_mangled_klass (s, method->klass); g_string_append_printf (s, "_%s_", method->name); - if (!append_mangled_signature (s, mono_method_signature (method))) { + if (!append_mangled_signature (s, mono_method_signature_internal (method))) { g_string_free (s, TRUE); return FALSE; } @@ -9520,7 +9520,7 @@ mono_aot_method_hash (MonoMethod *method) /* Similar to the hash in mono_method_get_imt_slot () */ - sig = mono_method_signature (method); + sig = mono_method_signature_internal (method); if (mono_class_is_ginst (method->klass)) class_ginst = mono_class_get_generic_class (method->klass)->context.class_inst; @@ -9632,7 +9632,7 @@ mono_aot_get_array_helper_from_wrapper (MonoMethod *method) helper_name = g_strdup_printf ("InternalArray__%s", mname); else helper_name = g_strdup_printf ("InternalArray__%s_%s", iname, mname); - m = get_method_nofail (mono_defaults.array_class, helper_name, mono_method_signature (method)->param_count, 0); + m = get_method_nofail (mono_defaults.array_class, helper_name, mono_method_signature_internal (method)->param_count, 0); g_assert (m); g_free (helper_name); g_free (s); @@ -11794,7 +11794,7 @@ resolve_profile_data (MonoAotCompile *acfg, ProfileData *data) if (strcmp (m->name, mdata->name)) continue; - MonoMethodSignature *sig = mono_method_signature (m); + MonoMethodSignature *sig = mono_method_signature_internal (m); if (!sig) continue; if (sig->param_count != mdata->param_count) diff --git a/mono/mini/aot-runtime.c b/mono/mini/aot-runtime.c index c3180a732fa..3d232e35551 100644 --- a/mono/mini/aot-runtime.c +++ b/mono/mini/aot-runtime.c @@ -867,8 +867,8 @@ sig_matches_target (MonoAotModule *module, MonoMethod *target, guint8 *buf, guin gboolean res; guint8 *p = buf; - sig = decode_signature_with_target (module, mono_method_signature (target), p, &p); - res = sig && mono_metadata_signature_equal (mono_method_signature (target), sig); + sig = decode_signature_with_target (module, mono_method_signature_internal (target), p, &p); + res = sig && mono_metadata_signature_equal (mono_method_signature_internal (target), sig); g_free (sig); *endbuf = p; return res; @@ -4720,7 +4720,7 @@ mono_aot_get_method (MonoDomain *domain, MonoMethod *method, MonoError *error) MonoGenericContext ctx; MonoType *args [16]; - if (mono_method_signature (method)->params [1]->type == MONO_TYPE_OBJECT) + if (mono_method_signature_internal (method)->params [1]->type == MONO_TYPE_OBJECT) /* Avoid recursion */ return NULL; @@ -4751,16 +4751,16 @@ mono_aot_get_method (MonoDomain *domain, MonoMethod *method, MonoError *error) /* Same for CompareExchange<T> and Exchange<T> */ /* Same for Volatile.Read<T>/Write<T> */ if (method_index == 0xffffff && method->wrapper_type == MONO_WRAPPER_MANAGED_TO_NATIVE && m_class_get_image (method->klass) == mono_defaults.corlib && - ((!strcmp (klass_name_space, "System.Threading") && !strcmp (klass_name, "Interlocked") && (!strcmp (method->name, "CompareExchange") || !strcmp (method->name, "Exchange")) && MONO_TYPE_IS_REFERENCE (mini_type_get_underlying_type (mono_method_signature (method)->params [1]))) || - (!strcmp (klass_name_space, "System.Threading") && !strcmp (klass_name, "Volatile") && (!strcmp (method->name, "Read") && MONO_TYPE_IS_REFERENCE (mini_type_get_underlying_type (mono_method_signature (method)->ret)))) || - (!strcmp (klass_name_space, "System.Threading") && !strcmp (klass_name, "Volatile") && (!strcmp (method->name, "Write") && MONO_TYPE_IS_REFERENCE (mini_type_get_underlying_type (mono_method_signature (method)->params [1])))))) { + ((!strcmp (klass_name_space, "System.Threading") && !strcmp (klass_name, "Interlocked") && (!strcmp (method->name, "CompareExchange") || !strcmp (method->name, "Exchange")) && MONO_TYPE_IS_REFERENCE (mini_type_get_underlying_type (mono_method_signature_internal (method)->params [1]))) || + (!strcmp (klass_name_space, "System.Threading") && !strcmp (klass_name, "Volatile") && (!strcmp (method->name, "Read") && MONO_TYPE_IS_REFERENCE (mini_type_get_underlying_type (mono_method_signature_internal (method)->ret)))) || + (!strcmp (klass_name_space, "System.Threading") && !strcmp (klass_name, "Volatile") && (!strcmp (method->name, "Write") && MONO_TYPE_IS_REFERENCE (mini_type_get_underlying_type (mono_method_signature_internal (method)->params [1])))))) { MonoMethod *m; MonoGenericContext ctx; MonoType *args [16]; gpointer iter = NULL; while ((m = mono_class_get_methods (method->klass, &iter))) { - if (mono_method_signature (m)->generic_param_count && !strcmp (m->name, method->name)) + if (mono_method_signature_internal (m)->generic_param_count && !strcmp (m->name, method->name)) break; } g_assert (m); @@ -4797,13 +4797,13 @@ mono_aot_get_method (MonoDomain *domain, MonoMethod *method, MonoError *error) int rank; if (!strcmp (array_method->name, "Set")) - rank = mono_method_signature (array_method)->param_count - 1; + rank = mono_method_signature_internal (array_method)->param_count - 1; else if (!strcmp (array_method->name, "Get") || !strcmp (array_method->name, "Address")) - rank = mono_method_signature (array_method)->param_count; + rank = mono_method_signature_internal (array_method)->param_count; else g_assert_not_reached (); MonoClass *obj_array_class = mono_class_create_array (mono_defaults.object_class, rank); - MonoMethod *m = mono_class_get_method_from_name_checked (obj_array_class, array_method->name, mono_method_signature (array_method)->param_count, 0, error); + MonoMethod *m = mono_class_get_method_from_name_checked (obj_array_class, array_method->name, mono_method_signature_internal (array_method)->param_count, 0, error); mono_error_assert_ok (error); g_assert (m); diff --git a/mono/mini/debug-mini.c b/mono/mini/debug-mini.c index 0f2de0be787..5d661c76ad5 100644 --- a/mono/mini/debug-mini.c +++ b/mono/mini/debug-mini.c @@ -236,7 +236,7 @@ mono_debug_close_method (MonoCompile *cfg) method = cfg->method; header = cfg->header; - sig = mono_method_signature (method); + sig = mono_method_signature_internal (method); jit = info->jit; jit->code_start = cfg->native_code; @@ -552,14 +552,14 @@ deserialize_debug_info (MonoMethod *method, guint8 *code_start, guint8 *buf, gui if (jit->has_var_info) { jit->num_locals = header->num_locals; - jit->num_params = mono_method_signature (method)->param_count; + jit->num_params = mono_method_signature_internal (method)->param_count; jit->params = g_new0 (MonoDebugVarInfo, jit->num_params); jit->locals = g_new0 (MonoDebugVarInfo, jit->num_locals); for (i = 0; i < jit->num_params; ++i) deserialize_variable (&jit->params [i], p, &p); - if (mono_method_signature (method)->hasthis) { + if (mono_method_signature_internal (method)->hasthis) { jit->this_var = g_new0 (MonoDebugVarInfo, 1); deserialize_variable (jit->this_var, p, &p); } diff --git a/mono/mini/debugger-agent.c b/mono/mini/debugger-agent.c index 159628cdbec..9b6c8a9e178 100644 --- a/mono/mini/debugger-agent.c +++ b/mono/mini/debugger-agent.c @@ -5963,7 +5963,7 @@ do_invoke_method (DebuggerTlsData *tls, Buffer *buf, InvokeData *invoke, guint8 m = decode_methodid (p, &p, end, &domain, &err); if (err != ERR_NONE) return err; - sig = mono_method_signature (m); + sig = mono_method_signature_internal (m); if (m_class_is_valuetype (m->klass)) this_buf = (guint8 *)g_alloca (mono_class_instance_size (m->klass)); @@ -7441,7 +7441,7 @@ buffer_add_cattrs (Buffer *buf, MonoDomain *domain, MonoImage *image, MonoClass for (j = 0; j < mono_array_length (typed_args); ++j) { MonoObject *val = mono_array_get (typed_args, MonoObject*, j); - t = mono_method_signature (attr->ctor)->params [j]; + t = mono_method_signature_internal (attr->ctor)->params [j]; buffer_add_cattr_arg (buf, t, domain, val); } @@ -8098,7 +8098,7 @@ method_commands_internal (int command, MonoMethod *method, MonoDomain *domain, g break; } case CMD_METHOD_GET_PARAM_INFO: { - MonoMethodSignature *sig = mono_method_signature (method); + MonoMethodSignature *sig = mono_method_signature_internal (method); guint32 i; char **names; @@ -8209,7 +8209,7 @@ method_commands_internal (int command, MonoMethod *method, MonoDomain *domain, g guint8 attrs = 0; if (method->is_generic) attrs |= (1 << 0); - if (mono_method_signature (method)->generic_param_count) + if (mono_method_signature_internal (method)->generic_param_count) attrs |= (1 << 1); buffer_add_byte (buf, attrs); if (method->is_generic || method->is_inflated) { @@ -8237,7 +8237,7 @@ method_commands_internal (int command, MonoMethod *method, MonoDomain *domain, g buffer_add_id (buf, 0); } if (CHECK_PROTOCOL_VERSION (2, 15)) { - if (mono_method_signature (method)->generic_param_count) { + if (mono_method_signature_internal (method)->generic_param_count) { int count, i; if (method->is_inflated) { @@ -8254,7 +8254,7 @@ method_commands_internal (int command, MonoMethod *method, MonoDomain *domain, g } else if (method->is_generic) { MonoGenericContainer *container = mono_method_get_generic_container (method); - count = mono_method_signature (method)->generic_param_count; + count = mono_method_signature_internal (method)->generic_param_count; buffer_add_int (buf, count); for (i = 0; i < count; i++) { MonoGenericParam *param = mono_generic_container_get_param (container, i); @@ -8663,7 +8663,7 @@ frame_commands (int command, guint8 *p, guint8 *end, Buffer *buf) jit = frame->jit; - sig = mono_method_signature (frame->actual_method); + sig = mono_method_signature_internal (frame->actual_method); if (!(jit->has_var_info || frame->de.ji->is_interp) || !mono_get_seq_points (frame->de.domain, frame->actual_method)) /* diff --git a/mono/mini/driver.c b/mono/mini/driver.c index 407e852319b..6c015706e9b 100644 --- a/mono/mini/driver.c +++ b/mono/mini/driver.c @@ -382,7 +382,7 @@ method_should_be_regression_tested (MonoMethod *method, gboolean interp) continue; MonoClass *klass = centry->ctor->klass; - if (strcmp (m_class_get_name (klass), "CategoryAttribute") || mono_method_signature (centry->ctor)->param_count != 1) + if (strcmp (m_class_get_name (klass), "CategoryAttribute") || mono_method_signature_internal (centry->ctor)->param_count != 1) continue; gpointer *typed_args, *named_args; @@ -1177,7 +1177,7 @@ compile_all_methods_thread_main_inner (CompileAllThreadArgs *args) if (mono_class_is_gtd (method->klass)) continue; - sig = mono_method_signature (method); + sig = mono_method_signature_internal (method); if (!sig) { char * desc = mono_method_full_name (method, TRUE); g_print ("Could not retrieve method signature for %s\n", desc); diff --git a/mono/mini/dwarfwriter.c b/mono/mini/dwarfwriter.c index d572b9151ec..6b488e952f2 100644 --- a/mono/mini/dwarfwriter.c +++ b/mono/mini/dwarfwriter.c @@ -1770,7 +1770,7 @@ mono_dwarf_writer_emit_method (MonoDwarfWriter *w, MonoCompile *cfg, MonoMethod emit_section_change (w, ".debug_info", 0); - sig = mono_method_signature (method); + sig = mono_method_signature_internal (method); header = mono_method_get_header_checked (method, error); mono_error_assert_ok (error); /* FIXME don't swallow the error */ diff --git a/mono/mini/interp/interp.c b/mono/mini/interp/interp.c index 19f6f75e879..58539bb803a 100644 --- a/mono/mini/interp/interp.c +++ b/mono/mini/interp/interp.c @@ -314,7 +314,7 @@ mono_interp_get_imethod (MonoDomain *domain, MonoMethod *method, MonoError *erro if (rtm) return rtm; - sig = mono_method_signature (method); + sig = mono_method_signature_internal (method); rtm = (InterpMethod*)mono_domain_alloc0 (domain, sizeof (InterpMethod)); rtm->method = method; @@ -1288,7 +1288,7 @@ interp_delegate_ctor (MonoObjectHandle this_obj, MonoObjectHandle target, gpoint if (!(imethod->method->flags & METHOD_ATTRIBUTE_STATIC)) { MonoMethod *invoke = mono_get_delegate_invoke (mono_handle_class (this_obj)); /* virtual invoke delegates must not have null check */ - if (mono_method_signature (imethod->method)->param_count == mono_method_signature (invoke)->param_count + if (mono_method_signature_internal (imethod->method)->param_count == mono_method_signature_internal (invoke)->param_count && MONO_HANDLE_IS_NULL (target)) { mono_error_set_argument (error, "this", "Delegate to an instance method cannot have null 'this'"); return; @@ -1418,7 +1418,7 @@ static char* dump_retval (InterpFrame *inv) { GString *str = g_string_new (""); - MonoType *ret = mono_method_signature (inv->imethod->method)->ret; + MonoType *ret = mono_method_signature_internal (inv->imethod->method)->ret; if (ret->type != MONO_TYPE_VOID) dump_stackval (str, inv->retval, ret); @@ -1432,7 +1432,7 @@ dump_args (InterpFrame *inv) { GString *str = g_string_new (""); int i; - MonoMethodSignature *signature = mono_method_signature (inv->imethod->method); + MonoMethodSignature *signature = mono_method_signature_internal (inv->imethod->method); if (signature->param_count == 0 && !signature->hasthis) return g_string_free (str, FALSE); @@ -1604,7 +1604,7 @@ interp_runtime_invoke (MonoMethod *method, void *obj, void **params, MonoObject { InterpFrame frame, *old_frame; ThreadContext *context = get_context (); - MonoMethodSignature *sig = mono_method_signature (method); + MonoMethodSignature *sig = mono_method_signature_internal (method); MonoClass *klass = mono_class_from_mono_type (sig->ret); stackval result; MonoMethod *target_method = method; @@ -1686,7 +1686,7 @@ interp_entry (InterpEntryData *data) context = get_context (); method = rmethod->method; - sig = mono_method_signature (method); + sig = mono_method_signature_internal (method); // FIXME: Optimize this @@ -1911,7 +1911,7 @@ do_jit_call (stackval *sp, unsigned char *vt_sp, ThreadContext *context, InterpF if (!rmethod->jit_wrapper) { MonoMethod *method = rmethod->method; - sig = mono_method_signature (method); + sig = mono_method_signature_internal (method); g_assert (sig); MonoMethod *wrapper = mini_get_gsharedvt_out_sig_wrapper (sig); @@ -2383,7 +2383,7 @@ interp_entry_from_trampoline (gpointer ccontext_untyped, gpointer rmethod_untype context = get_context (); method = rmethod->method; - sig = mono_method_signature (method); + sig = mono_method_signature_internal (method); frame.ex = NULL; old_frame = context->current_frame; @@ -2472,7 +2472,7 @@ interp_create_method_pointer (MonoMethod *method, gboolean compile, MonoError *e if (imethod->jit_entry) return imethod->jit_entry; - MonoMethodSignature *sig = mono_method_signature (method); + MonoMethodSignature *sig = mono_method_signature_internal (method); #ifndef MONO_ARCH_HAVE_INTERP_ENTRY_TRAMPOLINE MonoMethod *wrapper = mini_get_interp_in_wrapper (sig); @@ -4079,7 +4079,7 @@ interp_exec_method_full (InterpFrame *frame, ThreadContext *context, guint16 *st child_frame.ex = NULL; child_frame.imethod = (InterpMethod*)rtm->data_items [token]; - csig = mono_method_signature (child_frame.imethod->method); + csig = mono_method_signature_internal (child_frame.imethod->method); newobj_class = child_frame.imethod->method->klass; /*if (profiling_classes) { guint count = GPOINTER_TO_UINT (g_hash_table_lookup (profiling_classes, newobj_class)); @@ -4169,7 +4169,7 @@ interp_exec_method_full (InterpFrame *frame, ThreadContext *context, guint16 *st ip += 2; InterpMethod *cmethod = (InterpMethod*)rtm->data_items [token]; - csig = mono_method_signature (cmethod->method); + csig = mono_method_signature_internal (cmethod->method); g_assert (csig->hasthis); sp -= csig->param_count; @@ -5311,8 +5311,8 @@ interp_exec_method_full (InterpFrame *frame, ThreadContext *context, guint16 *st MINT_IN_CASE(MINT_MONO_RETOBJ) ++ip; sp--; - stackval_from_data (mono_method_signature (frame->imethod->method)->ret, frame->retval, sp->data.p, - mono_method_signature (frame->imethod->method)->pinvoke); + stackval_from_data (mono_method_signature_internal (frame->imethod->method)->ret, frame->retval, sp->data.p, + mono_method_signature_internal (frame->imethod->method)->pinvoke); if (sp > frame->stack) g_warning ("retobj: more values on stack: %d", sp-frame->stack); goto exit_frame; @@ -5909,7 +5909,7 @@ exit_frame: prof_ctx->interp_frame = frame; prof_ctx->method = frame->imethod->method; - MonoType *rtype = mono_method_signature (frame->imethod->method)->ret; + MonoType *rtype = mono_method_signature_internal (frame->imethod->method)->ret; switch (rtype->type) { case MONO_TYPE_VOID: diff --git a/mono/mini/interp/transform.c b/mono/mini/interp/transform.c index 2a256ebd3a0..2b46df2fb63 100644 --- a/mono/mini/interp/transform.c +++ b/mono/mini/interp/transform.c @@ -573,17 +573,17 @@ load_arg(TransformData *td, int n) MonoClass *klass = NULL; MonoType *type; - gboolean hasthis = mono_method_signature (td->method)->hasthis; + gboolean hasthis = mono_method_signature_internal (td->method)->hasthis; if (hasthis && n == 0) type = m_class_get_byval_arg (td->method->klass); else - type = mono_method_signature (td->method)->params [hasthis ? n - 1 : n]; + type = mono_method_signature_internal (td->method)->params [hasthis ? n - 1 : n]; mt = mint_type (type); if (mt == MINT_TYPE_VT) { gint32 size; klass = mono_class_from_mono_type (type); - if (mono_method_signature (td->method)->pinvoke) + if (mono_method_signature_internal (td->method)->pinvoke) size = mono_class_native_size (klass, NULL); else size = mono_class_value_size (klass, NULL); @@ -622,17 +622,17 @@ store_arg(TransformData *td, int n) CHECK_STACK (td, 1); MonoType *type; - gboolean hasthis = mono_method_signature (td->method)->hasthis; + gboolean hasthis = mono_method_signature_internal (td->method)->hasthis; if (hasthis && n == 0) type = m_class_get_byval_arg (td->method->klass); else - type = mono_method_signature (td->method)->params [n - !!hasthis]; + type = mono_method_signature_internal (td->method)->params [n - !!hasthis]; mt = mint_type (type); if (mt == MINT_TYPE_VT) { gint32 size; MonoClass *klass = mono_class_from_mono_type (type); - if (mono_method_signature (td->method)->pinvoke) + if (mono_method_signature_internal (td->method)->pinvoke) size = mono_class_native_size (klass, NULL); else size = mono_class_value_size (klass, NULL); @@ -652,11 +652,11 @@ static void store_inarg(TransformData *td, int n) { MonoType *type; - gboolean hasthis = mono_method_signature (td->method)->hasthis; + gboolean hasthis = mono_method_signature_internal (td->method)->hasthis; if (hasthis && n == 0) type = m_class_get_byval_arg (td->method->klass); else - type = mono_method_signature (td->method)->params [n - !!hasthis]; + type = mono_method_signature_internal (td->method)->params [n - !!hasthis]; int mt = mint_type (type); if (hasthis && n == 0) { @@ -667,7 +667,7 @@ store_inarg(TransformData *td, int n) if (mt == MINT_TYPE_VT) { MonoClass *klass = mono_class_from_mono_type (type); gint32 size; - if (mono_method_signature (td->method)->pinvoke) + if (mono_method_signature_internal (td->method)->pinvoke) size = mono_class_native_size (klass, NULL); else size = mono_class_value_size (klass, NULL); @@ -1379,7 +1379,7 @@ interp_transform_call (TransformData *td, MonoMethod *method, MonoMethod *target return_if_nok (error); } else target_method = (MonoMethod *)mono_method_get_wrapper_data (method, token); - csignature = mono_method_signature (target_method); + csignature = mono_method_signature_internal (target_method); if (generic_context) { csignature = mono_inflate_generic_signature (csignature, generic_context, error); @@ -1389,7 +1389,7 @@ interp_transform_call (TransformData *td, MonoMethod *method, MonoMethod *target } } } else { - csignature = mono_method_signature (target_method); + csignature = mono_method_signature_internal (target_method); } if (check_visibility && target_method && !mono_method_can_access_method (method, target_method)) @@ -1636,7 +1636,7 @@ interp_transform_call (TransformData *td, MonoMethod *method, MonoMethod *target if (op == MINT_CALLRUN) { ADD_CODE (td, get_data_item_index (td, target_method)); - ADD_CODE (td, get_data_item_index (td, mono_method_signature (target_method))); + ADD_CODE (td, get_data_item_index (td, mono_method_signature_internal (target_method))); } } else if (!calli && !is_virtual && jit_call_supported (target_method, csignature)) { ADD_CODE(td, MINT_JIT_CALL); @@ -2052,7 +2052,7 @@ emit_seq_point (TransformData *td, int il_offset, InterpBasicBlock *cbb, gboolea static void generate (MonoMethod *method, MonoMethodHeader *header, InterpMethod *rtm, unsigned char *is_bb_start, MonoGenericContext *generic_context, MonoError *error) { - MonoMethodSignature *signature = mono_method_signature (method); + MonoMethodSignature *signature = mono_method_signature_internal (method); MonoImage *image = m_class_get_image (method->klass); MonoDomain *domain = rtm->domain; MonoClass *constrained_class = NULL; @@ -3250,7 +3250,7 @@ generate (MonoMethod *method, MonoMethodHeader *header, InterpMethod *rtm, unsig goto_if_nok (error, exit); } - csignature = mono_method_signature (m); + csignature = mono_method_signature_internal (m); klass = m->klass; if (!mono_class_init (klass)) { @@ -5054,7 +5054,7 @@ mono_interp_transform_method (InterpMethod *imethod, ThreadContext *context, Mon MonoMethod *method = imethod->method; MonoImage *image = m_class_get_image (method->klass); MonoMethodHeader *header = NULL; - MonoMethodSignature *signature = mono_method_signature (method); + MonoMethodSignature *signature = mono_method_signature_internal (method); const unsigned char *ip, *end; const MonoOpcode *opcode; MonoMethod *m; @@ -5086,7 +5086,7 @@ mono_interp_transform_method (InterpMethod *imethod, ThreadContext *context, Mon MONO_PROFILER_RAISE (jit_begin, (method)); - if (mono_method_signature (method)->is_inflated) + if (mono_method_signature_internal (method)->is_inflated) generic_context = mono_method_get_context (method); else { MonoGenericContainer *generic_container = mono_method_get_generic_container (method); @@ -5104,9 +5104,9 @@ mono_interp_transform_method (InterpMethod *imethod, ThreadContext *context, Mon } /* assumes all internal calls with an array this are built in... */ - if (method->iflags & METHOD_IMPL_ATTRIBUTE_INTERNAL_CALL && (! mono_method_signature (method)->hasthis || m_class_get_rank (method->klass) == 0)) { + if (method->iflags & METHOD_IMPL_ATTRIBUTE_INTERNAL_CALL && (! mono_method_signature_internal (method)->hasthis || m_class_get_rank (method->klass) == 0)) { nm = mono_marshal_get_native_wrapper (method, TRUE, FALSE); - signature = mono_method_signature (nm); + signature = mono_method_signature_internal (nm); } else { const char *name = method->name; if (m_class_get_parent (method->klass) == mono_defaults.multicastdelegate_class) { diff --git a/mono/mini/jit-icalls.c b/mono/mini/jit-icalls.c index 7a84b37dc2d..ac515340d4a 100644 --- a/mono/mini/jit-icalls.c +++ b/mono/mini/jit-icalls.c @@ -702,7 +702,7 @@ mono_array_new_va (MonoMethod *cm, ...) int rank; int i, d; - pcount = mono_method_signature (cm)->param_count; + pcount = mono_method_signature_internal (cm)->param_count; rank = m_class_get_rank (cm->klass); va_start (ap, cm); @@ -749,7 +749,7 @@ mono_array_new_1 (MonoMethod *cm, guint32 length) int pcount; int rank; - pcount = mono_method_signature (cm)->param_count; + pcount = mono_method_signature_internal (cm)->param_count; rank = m_class_get_rank (cm->klass); lengths [0] = length; @@ -784,7 +784,7 @@ mono_array_new_2 (MonoMethod *cm, guint32 length1, guint32 length2) int pcount; int rank; - pcount = mono_method_signature (cm)->param_count; + pcount = mono_method_signature_internal (cm)->param_count; rank = m_class_get_rank (cm->klass); lengths [0] = length1; @@ -820,7 +820,7 @@ mono_array_new_3 (MonoMethod *cm, guint32 length1, guint32 length2, guint32 leng int pcount; int rank; - pcount = mono_method_signature (cm)->param_count; + pcount = mono_method_signature_internal (cm)->param_count; rank = m_class_get_rank (cm->klass); lengths [0] = length1; @@ -857,7 +857,7 @@ mono_array_new_4 (MonoMethod *cm, guint32 length1, guint32 length2, guint32 leng int pcount; int rank; - pcount = mono_method_signature (cm)->param_count; + pcount = mono_method_signature_internal (cm)->param_count; rank = m_class_get_rank (cm->klass); lengths [0] = length1; @@ -942,7 +942,7 @@ mono_ldtoken_wrapper (MonoImage *image, int token, MonoGenericContext *context) gpointer mono_ldtoken_wrapper_generic_shared (MonoImage *image, int token, MonoMethod *method) { - MonoMethodSignature *sig = mono_method_signature (method); + MonoMethodSignature *sig = mono_method_signature_internal (method); MonoGenericContext *generic_context; if (sig->is_inflated) { @@ -1367,7 +1367,7 @@ constrained_gsharedvt_call_setup (gpointer mp, MonoMethod *cmethod, MonoClass *k klass = this_obj->vtable->klass; } - if (mono_method_signature (cmethod)->pinvoke) { + if (mono_method_signature_internal (cmethod)->pinvoke) { /* Object.GetType () */ m = mono_marshal_get_native_wrapper (cmethod, TRUE, FALSE); } else { @@ -1884,7 +1884,7 @@ mono_llvmonly_init_delegate (MonoDelegate *del) if (mono_error_set_pending_exception (error)) return; - if (m_class_is_valuetype (m->klass) && mono_method_signature (m)->hasthis) + if (m_class_is_valuetype (m->klass) && mono_method_signature_internal (m)->hasthis) addr = mono_aot_get_unbox_trampoline (m); gpointer arg = mini_get_delegate_arg (del->method, addr); diff --git a/mono/mini/liveness.c b/mono/mini/liveness.c index 65a1facc652..0aedb15db2a 100644 --- a/mono/mini/liveness.c +++ b/mono/mini/liveness.c @@ -602,7 +602,7 @@ mono_analyze_liveness (MonoCompile *cfg) * VOLATILE, since that would prevent it from being allocated to * registers. */ - if (!cfg->disable_deadce_vars && !(cfg->gshared && mono_method_signature (cfg->method)->hasthis && cfg->varinfo [vi->idx] == cfg->args [0])) + if (!cfg->disable_deadce_vars && !(cfg->gshared && mono_method_signature_internal (cfg->method)->hasthis && cfg->varinfo [vi->idx] == cfg->args [0])) cfg->varinfo [vi->idx]->flags |= MONO_INST_IS_DEAD; } vi->range.first_use.abs_pos = 0; diff --git a/mono/mini/memory-access.c b/mono/mini/memory-access.c index 2b538acbf53..0d0748baffa 100644 --- a/mono/mini/memory-access.c +++ b/mono/mini/memory-access.c @@ -434,7 +434,7 @@ mini_emit_memory_copy_internal (MonoCompile *cfg, MonoInst *dest, MonoInst *src, iargs [0] = dest; iargs [1] = src; iargs [2] = size_ins; - mini_emit_calli (cfg, mono_method_signature (mini_get_memcpy_method ()), iargs, memcpy_ins, NULL, NULL); + mini_emit_calli (cfg, mono_method_signature_internal (mini_get_memcpy_method ()), iargs, memcpy_ins, NULL, NULL); } else { mini_emit_memcpy_const_size (cfg, dest, src, size, align); } diff --git a/mono/mini/method-to-ir.c b/mono/mini/method-to-ir.c index 0c917d607d4..c931450c6c4 100644 --- a/mono/mini/method-to-ir.c +++ b/mono/mini/method-to-ir.c @@ -167,7 +167,7 @@ mono_tailcall_print (const char *format, ...) } while (0) /* Determine whenever 'ins' represents a load of the 'this' argument */ -#define MONO_CHECK_THIS(ins) (mono_method_signature (cfg->method)->hasthis && ((ins)->opcode == OP_MOVE) && ((ins)->sreg1 == cfg->args [0]->dreg)) +#define MONO_CHECK_THIS(ins) (mono_method_signature_internal (cfg->method)->hasthis && ((ins)->opcode == OP_MOVE) && ((ins)->sreg1 == cfg->args [0]->dreg)) static int stind_to_store_membase (int opcode); @@ -2264,7 +2264,7 @@ check_method_sharing (MonoCompile *cfg, MonoMethod *cmethod, gboolean *out_pass_ if (mono_method_is_generic_sharable_full (cmethod, TRUE, TRUE, TRUE)) { pass_mrgctx = TRUE; } else { - if (cfg->gsharedvt && mini_is_gsharedvt_signature (mono_method_signature (cmethod))) + if (cfg->gsharedvt && mini_is_gsharedvt_signature (mono_method_signature_internal (cmethod))) pass_mrgctx = TRUE; } } @@ -2545,7 +2545,7 @@ mono_emit_method_call_full (MonoCompile *cfg, MonoMethod *method, MonoMethodSign gboolean need_unbox_trampoline; if (!sig) - sig = mono_method_signature (method); + sig = mono_method_signature_internal (method); if (cfg->llvm_only && mono_class_is_interface (method->klass)) g_assert_not_reached (); @@ -2684,7 +2684,7 @@ mono_emit_method_call_full (MonoCompile *cfg, MonoMethod *method, MonoMethodSign offset = MONO_STRUCT_OFFSET (MonoVTable, vtable) + ((mono_method_get_vtable_index (method)) * (TARGET_SIZEOF_VOID_P)); if (imt_arg) { - g_assert (mono_method_signature (method)->generic_param_count); + g_assert (mono_method_signature_internal (method)->generic_param_count); emit_imt_argument (cfg, call, call->method, imt_arg); } } @@ -2706,7 +2706,7 @@ mono_emit_method_call_full (MonoCompile *cfg, MonoMethod *method, MonoMethodSign MonoInst* mono_emit_method_call (MonoCompile *cfg, MonoMethod *method, MonoInst **args, MonoInst *this_ins) { - return mono_emit_method_call_full (cfg, method, mono_method_signature (method), FALSE, args, this_ins, NULL, NULL); + return mono_emit_method_call_full (cfg, method, mono_method_signature_internal (method), FALSE, args, this_ins, NULL, NULL); } MonoInst* @@ -3037,7 +3037,7 @@ mini_emit_initobj (MonoCompile *cfg, MonoInst *dest, const guchar *ip, MonoClass g_assert (bzero_method); iargs [0] = dest; iargs [1] = size_ins; - mini_emit_calli (cfg, mono_method_signature (bzero_method), iargs, bzero_ins, NULL, NULL); + mini_emit_calli (cfg, mono_method_signature_internal (bzero_method), iargs, bzero_ins, NULL, NULL); return; } @@ -3639,12 +3639,12 @@ handle_unbox_nullable (MonoCompile* cfg, MonoInst* val, MonoClass* klass, int co addr = emit_get_rgctx_method (cfg, context_used, method, MONO_RGCTX_INFO_GENERIC_METHOD_CODE); if (cfg->llvm_only) { - cfg->signatures = g_slist_prepend_mempool (cfg->mempool, cfg->signatures, mono_method_signature (method)); - return emit_llvmonly_calli (cfg, mono_method_signature (method), &val, addr); + cfg->signatures = g_slist_prepend_mempool (cfg->mempool, cfg->signatures, mono_method_signature_internal (method)); + return emit_llvmonly_calli (cfg, mono_method_signature_internal (method), &val, addr); } else { rgctx = emit_get_rgctx (cfg, context_used); - return mini_emit_calli (cfg, mono_method_signature (method), &val, addr, NULL, rgctx); + return mini_emit_calli (cfg, mono_method_signature_internal (method), &val, addr, NULL, rgctx); } } else { gboolean pass_vtable, pass_mrgctx; @@ -3900,7 +3900,7 @@ mini_emit_box (MonoCompile *cfg, MonoInst *val, MonoClass *klass, int context_us if (cfg->llvm_only && cfg->gsharedvt) { MonoInst *addr = emit_get_rgctx_method (cfg, context_used, method, MONO_RGCTX_INFO_GENERIC_METHOD_CODE); - return emit_llvmonly_calli (cfg, mono_method_signature (method), &val, addr); + return emit_llvmonly_calli (cfg, mono_method_signature_internal (method), &val, addr); } else { /* FIXME: What if the class is shared? We might not have to get the method address from the RGCTX. */ @@ -3908,7 +3908,7 @@ mini_emit_box (MonoCompile *cfg, MonoInst *val, MonoClass *klass, int context_us MONO_RGCTX_INFO_GENERIC_METHOD_CODE); MonoInst *rgctx = emit_get_rgctx (cfg, context_used); - return mini_emit_calli (cfg, mono_method_signature (method), &val, addr, NULL, rgctx); + return mini_emit_calli (cfg, mono_method_signature_internal (method), &val, addr, NULL, rgctx); } } else { gboolean pass_vtable, pass_mrgctx; @@ -4108,7 +4108,7 @@ handle_delegate_ctor (MonoCompile *cfg, MonoClass *klass, MonoInst *target, Mono g_assert (invoke); //FIXME verify & fix any issue with removing invoke_context_used restriction - if (invoke_context_used || !mono_get_delegate_virtual_invoke_impl (mono_method_signature (invoke), target_method_context_used ? NULL : method)) + if (invoke_context_used || !mono_get_delegate_virtual_invoke_impl (mono_method_signature_internal (invoke), target_method_context_used ? NULL : method)) return NULL; } @@ -4409,7 +4409,7 @@ mono_method_check_inlining (MonoCompile *cfg, MonoMethod *method) MonoVTable *vtable; int limit; #ifdef MONO_ARCH_SOFT_FLOAT_FALLBACK - MonoMethodSignature *sig = mono_method_signature (method); + MonoMethodSignature *sig = mono_method_signature_internal (method); int i; #endif @@ -4743,7 +4743,7 @@ mini_emit_ldelema_ins (MonoCompile *cfg, MonoMethod *cmethod, MonoInst **sp, guc int element_size; MonoClass *eclass = m_class_get_element_class (cmethod->klass); - rank = mono_method_signature (cmethod)->param_count - (is_set? 1: 0); + rank = mono_method_signature_internal (cmethod)->param_count - (is_set? 1: 0); if (rank == 1) return mini_emit_ldelema_1_ins (cfg, eclass, sp [0], sp [1], TRUE); @@ -5083,7 +5083,7 @@ inline_method (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSignature *fsig, #endif if (!fsig) - fsig = mono_method_signature (cmethod); + fsig = mono_method_signature_internal (cmethod); if (cfg->verbose_level > 2) printf ("INLINE START %p %s -> %s\n", cmethod, mono_method_full_name (cfg->method, TRUE), mono_method_full_name (cmethod, TRUE)); @@ -6151,7 +6151,7 @@ is_jit_optimizer_disabled (MonoMethod *m) p += 2; // FIXME: Support named parameters - sig = mono_method_signature (attr->ctor); + sig = mono_method_signature_internal (attr->ctor); if (sig->param_count != 2 || sig->params [0]->type != MONO_TYPE_BOOLEAN || sig->params [1]->type != MONO_TYPE_BOOLEAN) continue; /* Two boolean arguments */ @@ -6271,8 +6271,8 @@ is_supported_tailcall (MonoCompile *cfg, const guint8 *ip, MonoMethod *method, M MonoMethodSignature *caller_signature; MonoMethodSignature *callee_signature; - caller_signature = mono_method_signature (method); - callee_signature = cmethod ? mono_method_signature (cmethod) : fsig; + caller_signature = mono_method_signature_internal (method); + callee_signature = cmethod ? mono_method_signature_internal (cmethod) : fsig; g_assert (caller_signature); g_assert (callee_signature); @@ -6420,7 +6420,7 @@ handle_ctor_call (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSignature *fs static void emit_setret (MonoCompile *cfg, MonoInst *val) { - MonoType *ret_type = mini_get_underlying_type (mono_method_signature (cfg->method)->ret); + MonoType *ret_type = mini_get_underlying_type (mono_method_signature_internal (cfg->method)->ret); MonoInst *ins; if (mini_type_to_stind (cfg, ret_type) == CEE_STOBJ) { @@ -6644,7 +6644,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b } generic_container = mono_method_get_generic_container (method); - sig = mono_method_signature (method); + sig = mono_method_signature_internal (method); num_args = sig->hasthis + sig->param_count; ip = (guchar*)header->code; cfg->cil_start = ip; @@ -7457,7 +7457,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b mini_profiler_emit_tail_call (cfg, cmethod); - fsig = mono_method_signature (cmethod); + fsig = mono_method_signature_internal (cmethod); n = fsig->param_count + fsig->hasthis; if (cfg->llvm_only) { MonoInst **args; @@ -7744,7 +7744,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b if (!mono_class_init (cmethod->klass)) TYPE_LOAD_ERROR (cmethod->klass); - fsig = mono_method_signature (cmethod); + fsig = mono_method_signature_internal (cmethod); if (!fsig) LOAD_ERROR; if (cmethod->iflags & METHOD_IMPL_ATTRIBUTE_INTERNAL_CALL && @@ -7754,7 +7754,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b direct_icall = TRUE; } else if (fsig->pinvoke) { MonoMethod *wrapper = mono_marshal_get_native_wrapper (cmethod, TRUE, cfg->compile_aot); - fsig = mono_method_signature (wrapper); + fsig = mono_method_signature_internal (wrapper); } else if (constrained_class) { } else { fsig = mono_method_get_signature_checked (cmethod, image, token, generic_context, &cfg->error); @@ -7765,7 +7765,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b cfg->signatures = g_slist_prepend_mempool (cfg->mempool, cfg->signatures, fsig); /* See code below */ - if (cmethod->klass == mono_defaults.monitor_class && !strcmp (cmethod->name, "Enter") && mono_method_signature (cmethod)->param_count == 1) { + if (cmethod->klass == mono_defaults.monitor_class && !strcmp (cmethod->name, "Enter") && mono_method_signature_internal (cmethod)->param_count == 1) { MonoBasicBlock *tbb; GET_BBLOCK (cfg, tbb, next_ip); @@ -8219,7 +8219,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b * To work around this, we extend such try blocks to include the last x bytes * of the Monitor.Enter () call. */ - if (cmethod->klass == mono_defaults.monitor_class && !strcmp (cmethod->name, "Enter") && mono_method_signature (cmethod)->param_count == 1) { + if (cmethod->klass == mono_defaults.monitor_class && !strcmp (cmethod->name, "Enter") && mono_method_signature_internal (cmethod)->param_count == 1) { MonoBasicBlock *tbb; GET_BBLOCK (cfg, tbb, next_ip); @@ -8299,7 +8299,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b /* keep it simple */ for (i = fsig->param_count - 1; !has_vtargs && i >= 0; i--) - has_vtargs = MONO_TYPE_ISSTRUCT (mono_method_signature (cmethod)->params [i]); + has_vtargs = MONO_TYPE_ISSTRUCT (mono_method_signature_internal (cmethod)->params [i]); if (!has_vtargs) { if (need_seq_point) { @@ -8639,7 +8639,7 @@ calli_end: * (test case: test_0_inline_throw ()). */ if (return_var && cfg->cbb->in_count) { - MonoType *ret_type = mono_method_signature (method)->ret; + MonoType *ret_type = mono_method_signature_internal (method)->ret; MonoInst *store; CHECK_STACK (1); @@ -8658,7 +8658,7 @@ calli_end: emit_pop_lmf (cfg); if (cfg->ret) { - MonoType *ret_type = mini_get_underlying_type (mono_method_signature (method)->ret); + MonoType *ret_type = mini_get_underlying_type (mono_method_signature_internal (method)->ret); if (seq_points && !sym_seq_points) { /* @@ -9817,7 +9817,7 @@ calli_end: iargs [4] = sp [1]; if (cfg->opt & MONO_OPT_INLINE || cfg->compile_aot) { - costs = inline_method (cfg, stfld_wrapper, mono_method_signature (stfld_wrapper), + costs = inline_method (cfg, stfld_wrapper, mono_method_signature_internal (stfld_wrapper), iargs, ip, cfg->real_offset, TRUE); CHECK_CFG_EXCEPTION; g_assert (costs > 0); @@ -9891,7 +9891,7 @@ calli_end: EMIT_NEW_FIELDCONST (cfg, iargs [2], field); EMIT_NEW_ICONST (cfg, iargs [3], m_class_is_valuetype (klass) ? field->offset - MONO_ABI_SIZEOF (MonoObject) : field->offset); if (cfg->opt & MONO_OPT_INLINE || cfg->compile_aot) { - costs = inline_method (cfg, wrapper, mono_method_signature (wrapper), + costs = inline_method (cfg, wrapper, mono_method_signature_internal (wrapper), iargs, ip, cfg->real_offset, TRUE); CHECK_CFG_EXCEPTION; g_assert (costs > 0); @@ -11103,7 +11103,7 @@ mono_ldptr: */ g_assert (method->wrapper_type != MONO_WRAPPER_NONE); g_assert (cfg->ret); - g_assert (mono_method_signature (method)->pinvoke); + g_assert (mono_method_signature_internal (method)->pinvoke); --sp; klass = (MonoClass *)mono_method_get_wrapper_data (method, token); @@ -11481,7 +11481,7 @@ mono_ldptr: int invoke_context_used; invoke = mono_get_delegate_invoke (ctor_method->klass); - if (!invoke || !mono_method_signature (invoke)) + if (!invoke || !mono_method_signature_internal (invoke)) LOAD_ERROR; invoke_context_used = mini_method_check_context_used (cfg, invoke); @@ -11493,7 +11493,7 @@ mono_ldptr: if (!(cmethod->flags & METHOD_ATTRIBUTE_STATIC)) { /*LAME IMPL: We must not add a null check for virtual invoke delegates.*/ - if (mono_method_signature (invoke)->param_count == mono_method_signature (cmethod)->param_count) { + if (mono_method_signature_internal (invoke)->param_count == mono_method_signature_internal (cmethod)->param_count) { MONO_EMIT_NEW_BIALU_IMM (cfg, OP_COMPARE_IMM, -1, target_ins->dreg, 0); MONO_EMIT_NEW_COND_EXC (cfg, EQ, "ArgumentException"); } @@ -11550,7 +11550,7 @@ mono_ldptr: gboolean is_virtual = cmethod->flags & METHOD_ATTRIBUTE_VIRTUAL; invoke = mono_get_delegate_invoke (ctor_method->klass); - if (!invoke || !mono_method_signature (invoke)) + if (!invoke || !mono_method_signature_internal (invoke)) LOAD_ERROR; invoke_context_used = mini_method_check_context_used (cfg, invoke); diff --git a/mono/mini/mini-amd64.c b/mono/mini/mini-amd64.c index d44684b66f0..a2a6fe09415 100644 --- a/mono/mini/mini-amd64.c +++ b/mono/mini/mini-amd64.c @@ -1525,7 +1525,7 @@ mono_arch_compute_omit_fp (MonoCompile *cfg) header = cfg->header; - sig = mono_method_signature (cfg->method); + sig = mono_method_signature_internal (cfg->method); if (!cfg->arch.cinfo) cfg->arch.cinfo = get_call_info (cfg->mempool, sig); @@ -1636,7 +1636,7 @@ mono_arch_fill_argument_info (MonoCompile *cfg) int i; CallInfo *cinfo; - sig = mono_method_signature (cfg->method); + sig = mono_method_signature_internal (cfg->method); cinfo = cfg->arch.cinfo; @@ -1702,7 +1702,7 @@ mono_arch_allocate_vars (MonoCompile *cfg) gint32 *offsets; CallInfo *cinfo; - sig = mono_method_signature (cfg->method); + sig = mono_method_signature_internal (cfg->method); cinfo = cfg->arch.cinfo; sig_ret = mini_get_underlying_type (sig->ret); @@ -1924,7 +1924,7 @@ mono_arch_create_vars (MonoCompile *cfg) MonoMethodSignature *sig; CallInfo *cinfo; - sig = mono_method_signature (cfg->method); + sig = mono_method_signature_internal (cfg->method); if (!cfg->arch.cinfo) cfg->arch.cinfo = get_call_info (cfg->mempool, sig); @@ -2498,7 +2498,7 @@ mono_arch_emit_outarg_vt (MonoCompile *cfg, MonoInst *ins, MonoInst *src) void mono_arch_emit_setret (MonoCompile *cfg, MonoMethod *method, MonoInst *val) { - MonoType *ret = mini_get_underlying_type (mono_method_signature (method)->ret); + MonoType *ret = mini_get_underlying_type (mono_method_signature_internal (method)->ret); if (ret->type == MONO_TYPE_R4) { if (COMPILE_LLVM (cfg)) @@ -7144,7 +7144,7 @@ mono_arch_emit_prolog (MonoCompile *cfg) } } - sig = mono_method_signature (method); + sig = mono_method_signature_internal (method); pos = 0; cinfo = cfg->arch.cinfo; @@ -7654,7 +7654,7 @@ mono_arch_instrument_prolog (MonoCompile *cfg, void *func, void *p, gboolean ena if (enable_arguments) { /* Allocate a new area on the stack and save arguments there */ - sig = mono_method_signature (cfg->method); + sig = mono_method_signature_internal (cfg->method); n = sig->param_count + sig->hasthis; @@ -7703,7 +7703,7 @@ mono_arch_instrument_epilog (MonoCompile *cfg, void *func, void *p, gboolean ena guchar *code = (guchar *)p; int save_mode = SAVE_NONE; MonoMethod *method = cfg->method; - MonoType *ret_type = mini_get_underlying_type (mono_method_signature (method)->ret); + MonoType *ret_type = mini_get_underlying_type (mono_method_signature_internal (method)->ret); switch (ret_type->type) { case MONO_TYPE_VOID: diff --git a/mono/mini/mini-arm.c b/mono/mini/mini-arm.c index aeece6ebbae..fc5c64e89b2 100644 --- a/mono/mini/mini-arm.c +++ b/mono/mini/mini-arm.c @@ -1863,7 +1863,7 @@ mono_arch_compute_omit_fp (MonoCompile *cfg) header = cfg->header; - sig = mono_method_signature (cfg->method); + sig = mono_method_signature_internal (cfg->method); if (!cfg->arch.cinfo) cfg->arch.cinfo = get_call_info (cfg->mempool, sig); @@ -1930,7 +1930,7 @@ mono_arch_allocate_vars (MonoCompile *cfg) ArgInfo *ainfo; guint32 ualign; - sig = mono_method_signature (cfg->method); + sig = mono_method_signature_internal (cfg->method); if (!cfg->arch.cinfo) cfg->arch.cinfo = get_call_info (cfg->mempool, sig); @@ -2219,7 +2219,7 @@ mono_arch_create_vars (MonoCompile *cfg) CallInfo *cinfo; int i; - sig = mono_method_signature (cfg->method); + sig = mono_method_signature_internal (cfg->method); if (!cfg->arch.cinfo) cfg->arch.cinfo = get_call_info (cfg->mempool, sig); @@ -2764,7 +2764,7 @@ mono_arch_emit_outarg_vt (MonoCompile *cfg, MonoInst *ins, MonoInst *src) void mono_arch_emit_setret (MonoCompile *cfg, MonoMethod *method, MonoInst *val) { - MonoType *ret = mini_get_underlying_type (mono_method_signature (method)->ret); + MonoType *ret = mini_get_underlying_type (mono_method_signature_internal (method)->ret); if (!ret->byref) { if (ret->type == MONO_TYPE_I8 || ret->type == MONO_TYPE_U8) { @@ -3200,7 +3200,7 @@ mono_arch_instrument_epilog (MonoCompile *cfg, void *func, void *p, gboolean ena guchar *code = (guchar*)p; int save_mode = SAVE_NONE; MonoMethod *method = cfg->method; - MonoType *ret_type = mini_get_underlying_type (mono_method_signature (method)->ret); + MonoType *ret_type = mini_get_underlying_type (mono_method_signature_internal (method)->ret); int rtype = ret_type->type; int save_offset = cfg->param_area; save_offset += 7; @@ -5769,7 +5769,7 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb) break; case OP_SETFRET: { - MonoType *sig_ret = mini_get_underlying_type (mono_method_signature (cfg->method)->ret); + MonoType *sig_ret = mini_get_underlying_type (mono_method_signature_internal (cfg->method)->ret); if (sig_ret->type == MONO_TYPE_R4) { if (cfg->r4fp) { if (IS_HARD_FLOAT) { @@ -6302,7 +6302,7 @@ mono_arch_emit_prolog (MonoCompile *cfg) if (mono_jit_trace_calls != NULL && mono_trace_eval (method)) tracing = 1; - sig = mono_method_signature (method); + sig = mono_method_signature_internal (method); cfg->code_size = 256 + sig->param_count * 64; code = cfg->native_code = g_malloc (cfg->code_size); diff --git a/mono/mini/mini-arm64.c b/mono/mini/mini-arm64.c index 6c7405b165b..76f79e68ec1 100644 --- a/mono/mini/mini-arm64.c +++ b/mono/mini/mini-arm64.c @@ -2072,7 +2072,7 @@ mono_arch_create_vars (MonoCompile *cfg) MonoMethodSignature *sig; CallInfo *cinfo; - sig = mono_method_signature (cfg->method); + sig = mono_method_signature_internal (cfg->method); if (!cfg->arch.cinfo) cfg->arch.cinfo = get_call_info (cfg->mempool, sig); cinfo = cfg->arch.cinfo; @@ -2122,7 +2122,7 @@ mono_arch_allocate_vars (MonoCompile *cfg) * Compute cfg->stack_offset and update cfg->used_int_regs. */ - sig = mono_method_signature (cfg->method); + sig = mono_method_signature_internal (cfg->method); if (!cfg->arch.cinfo) cfg->arch.cinfo = get_call_info (cfg->mempool, sig); @@ -2732,7 +2732,7 @@ mono_arch_emit_setret (MonoCompile *cfg, MonoMethod *method, MonoInst *val) MonoMethodSignature *sig; CallInfo *cinfo; - sig = mono_method_signature (cfg->method); + sig = mono_method_signature_internal (cfg->method); if (!cfg->arch.cinfo) cfg->arch.cinfo = get_call_info (cfg->mempool, sig); cinfo = cfg->arch.cinfo; @@ -5004,7 +5004,7 @@ mono_arch_emit_prolog (MonoCompile *cfg) guint8 *code; int cfa_offset, max_offset; - sig = mono_method_signature (method); + sig = mono_method_signature_internal (method); cfg->code_size = 256 + sig->param_count * 64; code = cfg->native_code = g_malloc (cfg->code_size); diff --git a/mono/mini/mini-gc.c b/mono/mini/mini-gc.c index a1091e7db96..7448219143e 100644 --- a/mono/mini/mini-gc.c +++ b/mono/mini/mini-gc.c @@ -1625,7 +1625,7 @@ static void process_variables (MonoCompile *cfg) { MonoCompileGC *gcfg = cfg->gc_info; - MonoMethodSignature *sig = mono_method_signature (cfg->method); + MonoMethodSignature *sig = mono_method_signature_internal (cfg->method); int i, locals_min_slot, locals_max_slot, cindex; MonoBasicBlock *bb; MonoInst *tmp; @@ -2036,7 +2036,7 @@ compute_frame_size (MonoCompile *cfg) int i, locals_min_offset, locals_max_offset, cfa_min_offset, cfa_max_offset; int min_offset, max_offset; MonoCompileGC *gcfg = cfg->gc_info; - MonoMethodSignature *sig = mono_method_signature (cfg->method); + MonoMethodSignature *sig = mono_method_signature_internal (cfg->method); GSList *l; /* Compute min/max offsets from the fp */ diff --git a/mono/mini/mini-generic-sharing.c b/mono/mini/mini-generic-sharing.c index 2d075dba794..3c8b0143c91 100644 --- a/mono/mini/mini-generic-sharing.c +++ b/mono/mini/mini-generic-sharing.c @@ -1065,8 +1065,8 @@ class_type_info (MonoDomain *domain, MonoClass *klass, MonoRgctxInfoType info_ty gmethod = mini_get_shared_method_full (method, SHARE_MODE_GSHAREDVT, error); if (!gmethod) return NULL; - sig = mono_method_signature (method); - gsig = mono_method_signature (gmethod); + sig = mono_method_signature_internal (method); + gsig = mono_method_signature_internal (gmethod); addr = mini_add_method_wrappers_llvmonly (method, addr, TRUE, FALSE, &arg); return mini_create_llvmonly_ftndesc (domain, addr, arg); @@ -1083,8 +1083,8 @@ class_type_info (MonoDomain *domain, MonoClass *klass, MonoRgctxInfoType info_ty gmethod = mini_get_shared_method_full (method, SHARE_MODE_GSHAREDVT, error); if (!gmethod) return NULL; - sig = mono_method_signature (method); - gsig = mono_method_signature (gmethod); + sig = mono_method_signature_internal (method); + gsig = mono_method_signature_internal (gmethod); addr = mini_get_gsharedvt_wrapper (FALSE, addr, sig, gsig, -1, FALSE); addr = mono_create_static_rgctx_trampoline (method, addr); @@ -1952,7 +1952,7 @@ instantiate_info (MonoDomain *domain, MonoRuntimeGenericContextInfoTemplate *oti g_assert (ji); callee_gsharedvt = mini_jit_info_is_gsharedvt (ji); if (callee_gsharedvt) - callee_gsharedvt = mini_is_gsharedvt_variable_signature (mono_method_signature (jinfo_get_method (ji))); + callee_gsharedvt = mini_is_gsharedvt_variable_signature (mono_method_signature_internal (jinfo_get_method (ji))); if (callee_gsharedvt) { /* No need for a wrapper */ return mini_create_llvmonly_ftndesc (domain, addr, mini_method_get_rgctx (m)); @@ -2147,7 +2147,7 @@ instantiate_info (MonoDomain *domain, MonoRuntimeGenericContextInfoTemplate *oti g_assert (method->is_inflated); - sig = mono_method_signature (method); + sig = mono_method_signature_internal (method); gsig = call_sig; if (mono_llvm_only) { @@ -2155,7 +2155,7 @@ instantiate_info (MonoDomain *domain, MonoRuntimeGenericContextInfoTemplate *oti /* The virtual case doesn't go through this code */ g_assert (!virtual_); - sig = mono_method_signature (jinfo_get_method (callee_ji)); + sig = mono_method_signature_internal (jinfo_get_method (callee_ji)); gpointer out_wrapper = mini_get_gsharedvt_wrapper (FALSE, NULL, sig, gsig, -1, FALSE); MonoFtnDesc *out_wrapper_arg = mini_create_llvmonly_ftndesc (domain, callee_ji->code_start, mini_method_get_rgctx (method)); @@ -2194,8 +2194,8 @@ instantiate_info (MonoDomain *domain, MonoRuntimeGenericContextInfoTemplate *oti if (mono_llvm_only) { /* Both wrappers receive an extra <addr, rgctx> argument */ - sig = mono_method_signature (method); - gsig = mono_method_signature (jinfo_get_method (callee_ji)); + sig = mono_method_signature_internal (method); + gsig = mono_method_signature_internal (jinfo_get_method (callee_ji)); /* Return a function descriptor */ @@ -2215,14 +2215,14 @@ instantiate_info (MonoDomain *domain, MonoRuntimeGenericContextInfoTemplate *oti } else { addr = mini_create_llvmonly_ftndesc (domain, addr, mini_method_get_rgctx (method)); } - } else if (call_sig == mono_method_signature (method)) { + } else if (call_sig == mono_method_signature_internal (method)) { } else { - sig = mono_method_signature (method); - gsig = mono_method_signature (jinfo_get_method (callee_ji)); + sig = mono_method_signature_internal (method); + gsig = mono_method_signature_internal (jinfo_get_method (callee_ji)); addr = mini_get_gsharedvt_wrapper (TRUE, callee_ji->code_start, sig, gsig, -1, FALSE); - sig = mono_method_signature (method); + sig = mono_method_signature_internal (method); gsig = call_sig; addr = mini_get_gsharedvt_wrapper (FALSE, addr, sig, gsig, -1, FALSE); @@ -3041,7 +3041,7 @@ is_async_method (MonoMethod *method) attr_class = mono_class_try_get_iasync_state_machine_class (); /* Do less expensive checks first */ - sig = mono_method_signature (method); + sig = mono_method_signature_internal (method); if (attr_class && sig && ((sig->ret->type == MONO_TYPE_VOID) || (sig->ret->type == MONO_TYPE_CLASS && !strcmp (m_class_get_name (sig->ret->data.generic_class->container_class), "Task")) || (sig->ret->type == MONO_TYPE_GENERICINST && !strcmp (m_class_get_name (sig->ret->data.generic_class->container_class), "Task`1")))) { @@ -4153,7 +4153,7 @@ mini_is_gsharedvt_sharable_method (MonoMethod *method) return FALSE; } - sig = mono_method_signature (mono_method_get_declaring_generic_method (method)); + sig = mono_method_signature_internal (mono_method_get_declaring_generic_method (method)); if (!sig) return FALSE; diff --git a/mono/mini/mini-llvm.c b/mono/mini/mini-llvm.c index 94458c90ec3..6c6ecc03520 100644 --- a/mono/mini/mini-llvm.c +++ b/mono/mini/mini-llvm.c @@ -6867,7 +6867,7 @@ mono_llvm_check_method_supported (MonoCompile *cfg) int i, j; #ifdef TARGET_WASM - if (mono_method_signature (cfg->method)->call_convention == MONO_CALL_VARARG) { + if (mono_method_signature_internal (cfg->method)->call_convention == MONO_CALL_VARARG) { cfg->exception_message = g_strdup ("vararg callconv"); cfg->disable_llvm = TRUE; return; @@ -7184,7 +7184,7 @@ emit_method_inner (EmitContext *ctx) } #endif - sig = mono_method_signature (cfg->method); + sig = mono_method_signature_internal (cfg->method); ctx->sig = sig; linfo = get_llvm_call_info (cfg, sig); @@ -7709,14 +7709,14 @@ mono_llvm_create_vars (MonoCompile *cfg) { MonoMethodSignature *sig; - sig = mono_method_signature (cfg->method); + sig = mono_method_signature_internal (cfg->method); if (cfg->gsharedvt && cfg->llvm_only) { gboolean vretaddr = FALSE; if (mini_is_gsharedvt_variable_signature (sig) && sig->ret->type != MONO_TYPE_VOID) { vretaddr = TRUE; } else { - MonoMethodSignature *sig = mono_method_signature (cfg->method); + MonoMethodSignature *sig = mono_method_signature_internal (cfg->method); LLVMCallInfo *linfo; linfo = get_llvm_call_info (cfg, sig); diff --git a/mono/mini/mini-mips.c b/mono/mini/mini-mips.c index 0d63d8e20fd..c67fa8cd440 100644 --- a/mono/mini/mini-mips.c +++ b/mono/mini/mini-mips.c @@ -1331,7 +1331,7 @@ mono_arch_compute_omit_fp (MonoCompile *cfg) header = cfg->header; - sig = mono_method_signature (cfg->method); + sig = mono_method_signature_internal (cfg->method); if (!cfg->arch.cinfo) cfg->arch.cinfo = get_call_info (cfg->mempool, sig); @@ -1395,7 +1395,7 @@ mono_arch_allocate_vars (MonoCompile *cfg) #endif CallInfo *cinfo; - sig = mono_method_signature (cfg->method); + sig = mono_method_signature_internal (cfg->method); if (!cfg->arch.cinfo) cfg->arch.cinfo = get_call_info (cfg->mempool, sig); @@ -1611,7 +1611,7 @@ mono_arch_create_vars (MonoCompile *cfg) { MonoMethodSignature *sig; - sig = mono_method_signature (cfg->method); + sig = mono_method_signature_internal (cfg->method); if (MONO_TYPE_ISSTRUCT (sig->ret)) { cfg->vret_addr = mono_compile_create_var (cfg, mono_get_int_type (), OP_ARG); @@ -1924,7 +1924,7 @@ mono_arch_emit_outarg_vt (MonoCompile *cfg, MonoInst *ins, MonoInst *src) void mono_arch_emit_setret (MonoCompile *cfg, MonoMethod *method, MonoInst *val) { - MonoType *ret = mini_get_underlying_type (mono_method_signature (method)->ret); + MonoType *ret = mini_get_underlying_type (mono_method_signature_internal (method)->ret); if (!ret->byref) { #if (SIZEOF_REGISTER == 4) @@ -3074,7 +3074,7 @@ emit_load_volatile_arguments(MonoCompile *cfg, guint8 *code) CallInfo *cinfo; int i; - sig = mono_method_signature (method); + sig = mono_method_signature_internal (method); if (!cfg->arch.cinfo) cfg->arch.cinfo = get_call_info (cfg->mempool, sig); @@ -4647,7 +4647,7 @@ mips_adjust_stackframe(MonoCompile *cfg) g_print ("\tra_offset %d/0x%x delta %d/0x%x\n", ra_offset, ra_offset, delta, delta); } - sig = mono_method_signature (cfg->method); + sig = mono_method_signature_internal (cfg->method); if (sig && sig->ret && MONO_TYPE_ISSTRUCT (sig->ret)) { cfg->vret_addr->inst_offset += delta; } @@ -4798,7 +4798,7 @@ mono_arch_emit_prolog (MonoCompile *cfg) if (tracing) cfg->flags |= MONO_CFG_HAS_CALLS; - sig = mono_method_signature (method); + sig = mono_method_signature_internal (method); cfg->code_size = 768 + sig->param_count * 20; code = cfg->native_code = g_malloc (cfg->code_size); @@ -5167,7 +5167,7 @@ mono_arch_instrument_epilog (MonoCompile *cfg, void *func, void *p, gboolean ena guchar *code = p; int save_mode = SAVE_NONE; MonoMethod *method = cfg->method; - int rtype = mini_get_underlying_type (mono_method_signature (method)->ret)->type; + int rtype = mini_get_underlying_type (mono_method_signature_internal (method)->ret)->type; int save_offset = MIPS_STACK_PARAM_OFFSET; g_assert ((save_offset & (MIPS_STACK_ALIGNMENT-1)) == 0); diff --git a/mono/mini/mini-ppc.c b/mono/mini/mini-ppc.c index 758ebb06049..b324699fd71 100644 --- a/mono/mini/mini-ppc.c +++ b/mono/mini/mini-ppc.c @@ -1418,7 +1418,7 @@ mono_arch_allocate_vars (MonoCompile *m) m->used_int_regs |= 1 << frame_reg; } - sig = mono_method_signature (m->method); + sig = mono_method_signature_internal (m->method); offset = 0; curinst = 0; @@ -1561,7 +1561,7 @@ mono_arch_allocate_vars (MonoCompile *m) void mono_arch_create_vars (MonoCompile *cfg) { - MonoMethodSignature *sig = mono_method_signature (cfg->method); + MonoMethodSignature *sig = mono_method_signature_internal (cfg->method); if (MONO_TYPE_ISSTRUCT (sig->ret)) { cfg->vret_addr = mono_compile_create_var (cfg, mono_get_int_type (), OP_ARG); @@ -1840,7 +1840,7 @@ mono_arch_emit_outarg_vt (MonoCompile *cfg, MonoInst *ins, MonoInst *src) void mono_arch_emit_setret (MonoCompile *cfg, MonoMethod *method, MonoInst *val) { - MonoType *ret = mini_get_underlying_type (mono_method_signature (method)->ret); + MonoType *ret = mini_get_underlying_type (mono_method_signature_internal (method)->ret); if (!ret->byref) { #ifndef __mono_ppc64__ if (ret->type == MONO_TYPE_I8 || ret->type == MONO_TYPE_U8) { @@ -1900,7 +1900,7 @@ mono_arch_instrument_epilog (MonoCompile *cfg, void *func, void *p, gboolean ena guchar *code = p; int save_mode = SAVE_NONE; MonoMethod *method = cfg->method; - int rtype = mini_get_underlying_type (mono_method_signature (method)->ret)->type; + int rtype = mini_get_underlying_type (mono_method_signature_internal (method)->ret)->type; int save_offset = PPC_STACK_PARAM_OFFSET + cfg->param_area; save_offset += 15; save_offset &= ~15; @@ -4846,7 +4846,7 @@ mono_arch_emit_prolog (MonoCompile *cfg) if (mono_jit_trace_calls != NULL && mono_trace_eval (method)) tracing = 1; - sig = mono_method_signature (method); + sig = mono_method_signature_internal (method); cfg->code_size = 512 + sig->param_count * 32; code = cfg->native_code = g_malloc (cfg->code_size); diff --git a/mono/mini/mini-profiler.c b/mono/mini/mini-profiler.c index eb67e817cc4..698d06dea5c 100644 --- a/mono/mini/mini-profiler.c +++ b/mono/mini/mini-profiler.c @@ -34,7 +34,7 @@ emit_fill_call_ctx (MonoCompile *cfg, MonoInst *method, MonoInst *ret) MONO_EMIT_NEW_STORE_MEMBASE (cfg, OP_STORE_MEMBASE_REG, alloc->dreg, MONO_STRUCT_OFFSET (MonoProfilerCallContext, method), method->dreg); if (ret) { - MonoInst *var = mono_compile_create_var (cfg, mono_method_signature (cfg->method)->ret, OP_LOCAL); + MonoInst *var = mono_compile_create_var (cfg, mono_method_signature_internal (cfg->method)->ret, OP_LOCAL); MonoInst *store, *addr; @@ -254,7 +254,7 @@ get_variable_buffer (MonoDebugMethodJitInfo *jit, MonoDebugVarInfo *var, MonoCon gpointer mini_profiler_context_get_this (MonoProfilerCallContext *ctx) { - if (!mono_method_signature (ctx->method)->hasthis) + if (!mono_method_signature_internal (ctx->method)->hasthis) return NULL; if (ctx->interp_frame) @@ -271,7 +271,7 @@ mini_profiler_context_get_this (MonoProfilerCallContext *ctx) gpointer mini_profiler_context_get_argument (MonoProfilerCallContext *ctx, guint32 pos) { - MonoMethodSignature *sig = mono_method_signature (ctx->method); + MonoMethodSignature *sig = mono_method_signature_internal (ctx->method); if (pos >= sig->param_count) return NULL; @@ -320,7 +320,7 @@ mini_profiler_context_get_result (MonoProfilerCallContext *ctx) if (!ctx->return_value) return NULL; - return memdup_with_type (ctx->return_value, mono_method_signature (ctx->method)->ret); + return memdup_with_type (ctx->return_value, mono_method_signature_internal (ctx->method)->ret); } void diff --git a/mono/mini/mini-runtime.c b/mono/mini/mini-runtime.c index 0aca3667cd1..ee38b4be7af 100644 --- a/mono/mini/mini-runtime.c +++ b/mono/mini/mini-runtime.c @@ -2743,7 +2743,7 @@ create_runtime_invoke_info (MonoDomain *domain, MonoMethod *method, gpointer com if (mono_llvm_only && method->string_ctor) info->sig = mono_marshal_get_string_ctor_signature (method); else - info->sig = mono_method_signature (method); + info->sig = mono_method_signature_internal (method); invoke = mono_marshal_get_runtime_invoke (method, FALSE); info->vtable = mono_class_vtable_checked (domain, method->klass, error); @@ -3040,7 +3040,7 @@ mono_jit_runtime_invoke (MonoMethod *method, void *obj, void **params, MonoObjec ji = mini_jit_info_table_find (mono_domain_get (), (char *)mono_get_addr_from_ftnptr (compiled_method), NULL); callee_gsharedvt = mini_jit_info_is_gsharedvt (ji); if (callee_gsharedvt) - callee_gsharedvt = mini_is_gsharedvt_variable_signature (mono_method_signature (jinfo_get_method (ji))); + callee_gsharedvt = mini_is_gsharedvt_variable_signature (mono_method_signature_internal (jinfo_get_method (ji))); } if (!callee_gsharedvt) @@ -3104,7 +3104,7 @@ mono_jit_runtime_invoke (MonoMethod *method, void *obj, void **params, MonoObjec } } if (info->dyn_call_info) { - MonoMethodSignature *sig = mono_method_signature (method); + MonoMethodSignature *sig = mono_method_signature_internal (method); gpointer *args; int i, pindex, buf_size; guint8 *buf; @@ -3598,13 +3598,13 @@ mono_jit_create_remoting_trampoline (MonoDomain *domain, MonoMethod *method, Mon error_init (error); - if ((method->flags & METHOD_ATTRIBUTE_VIRTUAL) && mono_method_signature (method)->generic_param_count) { + if ((method->flags & METHOD_ATTRIBUTE_VIRTUAL) && mono_method_signature_internal (method)->generic_param_count) { return mono_create_specific_trampoline (method, MONO_TRAMPOLINE_GENERIC_VIRTUAL_REMOTING, domain, NULL); } if ((method->flags & METHOD_ATTRIBUTE_ABSTRACT) || - (mono_method_signature (method)->hasthis && (mono_class_is_marshalbyref (method->klass) || method->klass == mono_defaults.object_class))) + (mono_method_signature_internal (method)->hasthis && (mono_class_is_marshalbyref (method->klass) || method->klass == mono_defaults.object_class))) nm = mono_marshal_get_remoting_invoke_for_target (method, target, error); else nm = method; @@ -3707,7 +3707,7 @@ is_callee_gsharedvt_variable (gpointer addr) g_assert (ji); callee_gsharedvt = mini_jit_info_is_gsharedvt (ji); if (callee_gsharedvt) - callee_gsharedvt = mini_is_gsharedvt_variable_signature (mono_method_signature (jinfo_get_method (ji))); + callee_gsharedvt = mini_is_gsharedvt_variable_signature (mono_method_signature_internal (jinfo_get_method (ji))); return callee_gsharedvt; } @@ -5074,7 +5074,7 @@ mono_precompile_assembly (MonoAssembly *ass, void *user_data) mono_error_assert_ok (error); } #ifndef DISABLE_REMOTING - if (mono_class_is_marshalbyref (method->klass) && mono_method_signature (method)->hasthis) { + if (mono_class_is_marshalbyref (method->klass) && mono_method_signature_internal (method)->hasthis) { invoke = mono_marshal_get_remoting_invoke_with_check (method, error); mono_error_assert_ok (error); mono_compile_method_checked (invoke, error); diff --git a/mono/mini/mini-s390x.c b/mono/mini/mini-s390x.c index e1deb47ce29..3ccce9bdd4f 100644 --- a/mono/mini/mini-s390x.c +++ b/mono/mini/mini-s390x.c @@ -1034,7 +1034,7 @@ enter_method (MonoMethod *method, RegParm *rParm, char *sp) if (rParm == NULL) return; - sig = mono_method_signature (method); + sig = mono_method_signature_internal (method); cinfo = get_call_info (NULL, sig); @@ -1150,7 +1150,7 @@ leave_method (MonoMethod *method, ...) fprintf (trFd, "LEAVE: %s", fname); g_free (fname); - type = mono_method_signature (method)->ret; + type = mono_method_signature_internal (method)->ret; handle_enum: switch (type->type) { @@ -1365,7 +1365,7 @@ handle_enum: break; default: fprintf (trFd, "(unknown return type %x)", - mono_method_signature (method)->ret->type); + mono_method_signature_internal (method)->ret->type); } ip = ((gint64) __builtin_extract_return_addr (__builtin_return_address (0))); @@ -2085,7 +2085,7 @@ mono_arch_allocate_vars (MonoCompile *cfg) if (frame_reg != STK_BASE) cfg->used_int_regs |= (1LL << frame_reg); - sig = mono_method_signature (cfg->method); + sig = mono_method_signature_internal (cfg->method); cinfo = get_call_info (cfg->mempool, sig); @@ -2306,7 +2306,7 @@ mono_arch_create_vars (MonoCompile *cfg) MonoMethodSignature *sig; CallInfo *cinfo; - sig = mono_method_signature (cfg->method); + sig = mono_method_signature_internal (cfg->method); cinfo = get_call_info (cfg->mempool, sig); @@ -2651,7 +2651,7 @@ mono_arch_emit_outarg_vt (MonoCompile *cfg, MonoInst *ins, MonoInst *src) void mono_arch_emit_setret (MonoCompile *cfg, MonoMethod *method, MonoInst *val) { - MonoType *ret = mini_get_underlying_type (mono_method_signature (method)->ret); + MonoType *ret = mini_get_underlying_type (mono_method_signature_internal (method)->ret); if (!ret->byref) { if (ret->type == MONO_TYPE_R4) { @@ -2729,7 +2729,7 @@ mono_arch_instrument_epilog (MonoCompile *cfg, void *func, void *p, gboolean ena int save_mode = SAVE_NONE, saveOffset; MonoMethod *method = cfg->method; - int rtype = mini_get_underlying_type (mono_method_signature (method)->ret)->type; + int rtype = mini_get_underlying_type (mono_method_signature_internal (method)->ret)->type; set_code_cursor (cfg, code); /*-----------------------------------------*/ @@ -2761,8 +2761,8 @@ handle_enum: save_mode = SAVE_R8; break; case MONO_TYPE_VALUETYPE: - if (m_class_is_enumtype (mono_method_signature (method)->ret->data.klass)) { - rtype = mono_class_enum_basetype_internal (mono_method_signature (method)->ret->data.klass)->type; + if (m_class_is_enumtype (mono_method_signature_internal (method)->ret->data.klass)) { + rtype = mono_class_enum_basetype_internal (mono_method_signature_internal (method)->ret->data.klass)->type; goto handle_enum; } save_mode = SAVE_STRUCT; @@ -4275,7 +4275,7 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb) case OP_TAILCALL_MEMBASE : { MonoCallInst *call = (MonoCallInst *) ins; MonoMethod *method = call->method; - MonoMethodSignature *sig = mono_method_signature(method); + MonoMethodSignature *sig = mono_method_signature_internal (method); CallInfo *cinfo = get_call_info (NULL, sig); int32_t stackUsage = (cinfo->sz.stack_size - S390_MINIMAL_STACK_SIZE), stackOffset = S390_MINIMAL_STACK_SIZE; @@ -6249,7 +6249,7 @@ mono_arch_emit_prolog (MonoCompile *cfg) } /* load arguments allocated to register from the stack */ - sig = mono_method_signature (method); + sig = mono_method_signature_internal (method); pos = 0; cinfo = get_call_info (cfg->mempool, sig); diff --git a/mono/mini/mini-sparc.c b/mono/mini/mini-sparc.c index 03390c17cc4..1a440725c4e 100644 --- a/mono/mini/mini-sparc.c +++ b/mono/mini/mini-sparc.c @@ -747,7 +747,7 @@ mono_arch_get_global_int_regs (MonoCompile *cfg) MonoMethodSignature *sig; CallInfo *cinfo; - sig = mono_method_signature (cfg->method); + sig = mono_method_signature_internal (cfg->method); cinfo = get_call_info (cfg, sig, FALSE); @@ -793,7 +793,7 @@ mono_arch_allocate_vars (MonoCompile *cfg) header = cfg->header; - sig = mono_method_signature (cfg->method); + sig = mono_method_signature_internal (cfg->method); cinfo = get_call_info (cfg, sig, FALSE); @@ -1027,7 +1027,7 @@ mono_arch_create_vars (MonoCompile *cfg) { MonoMethodSignature *sig; - sig = mono_method_signature (cfg->method); + sig = mono_method_signature_internal (cfg->method); if (MONO_TYPE_ISSTRUCT ((sig->ret))) { cfg->vret_addr = mono_compile_create_var (cfg, mono_get_int_type (), OP_ARG); @@ -1342,8 +1342,8 @@ mono_arch_emit_outarg_vt (MonoCompile *cfg, MonoInst *ins, MonoInst *src) void mono_arch_emit_setret (MonoCompile *cfg, MonoMethod *method, MonoInst *val) { - CallInfo *cinfo = get_call_info (cfg, mono_method_signature (method), FALSE); - MonoType *ret = mini_get_underlying_type (mono_method_signature (method)->ret); + CallInfo *cinfo = get_call_info (cfg, mono_method_signature_internal (method), FALSE); + MonoType *ret = mini_get_underlying_type (mono_method_signature_internal (method)->ret); switch (cinfo->ret.storage) { case ArgInIReg: @@ -2116,7 +2116,7 @@ emit_load_volatile_arguments (MonoCompile *cfg, guint32 *code) /* FIXME: Generate intermediate code instead */ - sig = mono_method_signature (method); + sig = mono_method_signature_internal (method); cinfo = get_call_info (cfg, sig, FALSE); @@ -2928,7 +2928,7 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb) code = emit_move_return_value (ins, code); break; case OP_SETFRET: - if (mono_method_signature (cfg->method)->ret->type == MONO_TYPE_R4) + if (mono_method_signature_internal (cfg->method)->ret->type == MONO_TYPE_R4) sparc_fdtos (code, ins->sreg1, sparc_f0); else { #ifdef SPARCV9 @@ -3707,7 +3707,7 @@ mono_arch_instrument_prolog (MonoCompile *cfg, void *func, void *p, gboolean ena { int i; guint32 *code = (guint32*)p; - MonoMethodSignature *sig = mono_method_signature (cfg->method); + MonoMethodSignature *sig = mono_method_signature_internal (cfg->method); CallInfo *cinfo; /* Save registers to stack */ @@ -3778,7 +3778,7 @@ mono_arch_instrument_epilog (MonoCompile *cfg, void *func, void *p, gboolean ena int save_mode = SAVE_NONE; MonoMethod *method = cfg->method; - switch (mini_get_underlying_type (mono_method_signature (method)->ret)->type) { + switch (mini_get_underlying_type (mono_method_signature_internal (method)->ret)->type) { case MONO_TYPE_VOID: /* special case string .ctor icall */ if (strcmp (".ctor", method->name) && method->klass == mono_defaults.string_class) @@ -3929,7 +3929,7 @@ mono_arch_emit_prolog (MonoCompile *cfg) } */ - sig = mono_method_signature (method); + sig = mono_method_signature_internal (method); cinfo = get_call_info (cfg, sig, FALSE); @@ -4111,7 +4111,7 @@ mono_arch_emit_epilog (MonoCompile *cfg) * The V8 ABI requires that calls to functions which return a structure * return to %i7+12 */ - if (!v64 && mono_method_signature (cfg->method)->pinvoke && MONO_TYPE_ISSTRUCT(mono_method_signature (cfg->method)->ret)) + if (!v64 && mono_method_signature_internal (cfg->method)->pinvoke && MONO_TYPE_ISSTRUCT(mono_method_signature_internal (cfg->method)->ret)) sparc_jmpl_imm (code, sparc_i7, 12, sparc_g0); else sparc_ret (code); diff --git a/mono/mini/mini-trampolines.c b/mono/mini/mini-trampolines.c index 5fa39151ce7..cd039cdc9b7 100644 --- a/mono/mini/mini-trampolines.c +++ b/mono/mini/mini-trampolines.c @@ -379,14 +379,14 @@ mini_add_method_trampoline (MonoMethod *m, gpointer compiled_method, gboolean ad if (ji && !ji->is_trampoline) jmethod = jinfo_get_method (ji); - if (callee_gsharedvt && mini_is_gsharedvt_variable_signature (mono_method_signature (jmethod))) { + if (callee_gsharedvt && mini_is_gsharedvt_variable_signature (mono_method_signature_internal (jmethod))) { MonoMethodSignature *sig, *gsig; /* Here m is a generic instance, while ji->method is the gsharedvt method implementing it */ /* Call from normal/gshared code to gsharedvt code with variable signature */ - sig = mono_method_signature (m); - gsig = mono_method_signature (jmethod); + sig = mono_method_signature_internal (m); + gsig = mono_method_signature_internal (jmethod); addr = mini_get_gsharedvt_wrapper (TRUE, addr, sig, gsig, -1, FALSE); @@ -492,7 +492,7 @@ mini_add_method_wrappers_llvmonly (MonoMethod *m, gpointer compiled_method, gboo jmethod = jinfo_get_method (ji); if (callee_gsharedvt) - callee_gsharedvt = mini_is_gsharedvt_variable_signature (mono_method_signature (jmethod)); + callee_gsharedvt = mini_is_gsharedvt_variable_signature (mono_method_signature_internal (jmethod)); if (!caller_gsharedvt && callee_gsharedvt) { MonoMethodSignature *sig, *gsig; @@ -501,8 +501,8 @@ mini_add_method_wrappers_llvmonly (MonoMethod *m, gpointer compiled_method, gboo /* Here m is a generic instance, while ji->method is the gsharedvt method implementing it */ /* Call from normal/gshared code to gsharedvt code with variable signature */ - sig = mono_method_signature (m); - gsig = mono_method_signature (jmethod); + sig = mono_method_signature_internal (m); + gsig = mono_method_signature_internal (jmethod); wrapper_addr = mini_get_gsharedvt_wrapper (TRUE, addr, sig, gsig, -1, FALSE); @@ -521,7 +521,7 @@ mini_add_method_wrappers_llvmonly (MonoMethod *m, gpointer compiled_method, gboo /* * The callee uses the gsharedvt calling convention, have to add an out wrapper. */ - gpointer out_wrapper = mini_get_gsharedvt_wrapper (FALSE, NULL, mono_method_signature (m), NULL, -1, FALSE); + gpointer out_wrapper = mini_get_gsharedvt_wrapper (FALSE, NULL, mono_method_signature_internal (m), NULL, -1, FALSE); MonoFtnDesc *out_wrapper_arg = mini_create_llvmonly_ftndesc (mono_domain_get (), addr, *out_arg); addr = out_wrapper; @@ -1306,7 +1306,7 @@ mono_delegate_trampoline (host_mgreg_t *regs, guint8 *code, gpointer *arg, guint multicast = ((MonoMulticastDelegate*)delegate)->delegates != NULL; if (!multicast && !callvirt) { - if (method && (method->flags & METHOD_ATTRIBUTE_STATIC) && mono_method_signature (method)->param_count == mono_method_signature (invoke)->param_count + 1) + if (method && (method->flags & METHOD_ATTRIBUTE_STATIC) && mono_method_signature_internal (method)->param_count == mono_method_signature_internal (invoke)->param_count + 1) /* Closed static delegate */ code = impl_this; else @@ -1605,9 +1605,9 @@ mono_create_delegate_trampoline_info (MonoDomain *domain, MonoClass *klass, Mono tramp_info = (MonoDelegateTrampInfo *)mono_domain_alloc0 (domain, sizeof (MonoDelegateTrampInfo)); tramp_info->invoke = invoke; - tramp_info->invoke_sig = mono_method_signature (invoke); - tramp_info->impl_this = mono_arch_get_delegate_invoke_impl (mono_method_signature (invoke), TRUE); - tramp_info->impl_nothis = mono_arch_get_delegate_invoke_impl (mono_method_signature (invoke), FALSE); + tramp_info->invoke_sig = mono_method_signature_internal (invoke); + tramp_info->impl_this = mono_arch_get_delegate_invoke_impl (mono_method_signature_internal (invoke), TRUE); + tramp_info->impl_nothis = mono_arch_get_delegate_invoke_impl (mono_method_signature_internal (invoke), FALSE); tramp_info->method = method; if (method) { error_init (error); @@ -1649,7 +1649,7 @@ mono_create_delegate_virtual_trampoline (MonoDomain *domain, MonoClass *klass, M MonoMethod *invoke = mono_get_delegate_invoke (klass); g_assert (invoke); - return mono_get_delegate_virtual_invoke_impl (mono_method_signature (invoke), method); + return mono_get_delegate_virtual_invoke_impl (mono_method_signature_internal (invoke), method); } gpointer diff --git a/mono/mini/mini-wasm-debugger.c b/mono/mini/mini-wasm-debugger.c index 426a04eb4c6..243a0a472f6 100644 --- a/mono/mini/mini-wasm-debugger.c +++ b/mono/mini/mini-wasm-debugger.c @@ -586,7 +586,7 @@ describe_variable (MonoStackFrameInfo *info, MonoContext *ctx, gpointer ud) int pos = data->variable; if (pos < 0) { pos = -pos - 1; - type = mono_method_signature (method)->params [pos]; + type = mono_method_signature_internal (method)->params [pos]; addr = mini_get_interp_callbacks ()->frame_get_arg (frame, pos); } else { header = mono_method_get_header_checked (method, error); diff --git a/mono/mini/mini-wasm.c b/mono/mini/mini-wasm.c index ae19f7f6c42..513dfed02d8 100644 --- a/mono/mini/mini-wasm.c +++ b/mono/mini/mini-wasm.c @@ -203,7 +203,7 @@ mono_arch_create_vars (MonoCompile *cfg) CallInfo *cinfo; MonoType *sig_ret; - sig = mono_method_signature (cfg->method); + sig = mono_method_signature_internal (cfg->method); if (!cfg->arch.cinfo) cfg->arch.cinfo = get_call_info (cfg->mempool, sig); @@ -270,7 +270,7 @@ mono_arch_emit_prolog (MonoCompile *cfg) void mono_arch_emit_setret (MonoCompile *cfg, MonoMethod *method, MonoInst *val) { - MonoType *ret = mini_get_underlying_type (mono_method_signature (method)->ret); + MonoType *ret = mini_get_underlying_type (mono_method_signature_internal (method)->ret); if (!ret->byref) { if (ret->type == MONO_TYPE_R4) { diff --git a/mono/mini/mini-x86.c b/mono/mini/mini-x86.c index 2cce00faab0..4a3566d4eed 100644 --- a/mono/mini/mini-x86.c +++ b/mono/mini/mini-x86.c @@ -981,7 +981,7 @@ needs_stack_frame (MonoCompile *cfg) return cfg->arch.need_stack_frame; header = cfg->header; - sig = mono_method_signature (cfg->method); + sig = mono_method_signature_internal (cfg->method); if (cfg->disable_omit_fp) result = TRUE; @@ -1025,7 +1025,7 @@ mono_arch_allocate_vars (MonoCompile *cfg) CallInfo *cinfo; header = cfg->header; - sig = mono_method_signature (cfg->method); + sig = mono_method_signature_internal (cfg->method); if (!cfg->arch.cinfo) cfg->arch.cinfo = get_call_info (cfg->mempool, sig); @@ -1192,7 +1192,7 @@ mono_arch_create_vars (MonoCompile *cfg) MonoMethodSignature *sig; CallInfo *cinfo; - sig = mono_method_signature (cfg->method); + sig = mono_method_signature_internal (cfg->method); if (!cfg->arch.cinfo) cfg->arch.cinfo = get_call_info (cfg->mempool, sig); @@ -1657,7 +1657,7 @@ mono_arch_emit_outarg_vt (MonoCompile *cfg, MonoInst *ins, MonoInst *src) void mono_arch_emit_setret (MonoCompile *cfg, MonoMethod *method, MonoInst *val) { - MonoType *ret = mini_get_underlying_type (mono_method_signature (method)->ret); + MonoType *ret = mini_get_underlying_type (mono_method_signature_internal (method)->ret); if (!ret->byref) { if (ret->type == MONO_TYPE_R4) { @@ -1691,7 +1691,7 @@ void* mono_arch_instrument_prolog (MonoCompile *cfg, void *func, void *p, gboolean enable_arguments) { guchar *code = (guchar*)p; - MonoMethodSignature *sig = mono_method_signature (cfg->method); + MonoMethodSignature *sig = mono_method_signature_internal (cfg->method); int argument_copy_size = 0; const guint32* param_regs; int stack_size; @@ -1774,7 +1774,7 @@ mono_arch_instrument_epilog (MonoCompile *cfg, void *func, void *p, gboolean ena guchar *code = (guchar*)p; int arg_size = 0, stack_usage = 0, save_mode = SAVE_NONE; MonoMethod *method = cfg->method; - MonoType *ret_type = mini_get_underlying_type (mono_method_signature (method)->ret); + MonoType *ret_type = mini_get_underlying_type (mono_method_signature_internal (method)->ret); switch (ret_type->type) { case MONO_TYPE_VOID: @@ -5330,7 +5330,7 @@ mono_arch_emit_prolog (MonoCompile *cfg) } /* load arguments allocated to register from the stack */ - sig = mono_method_signature (method); + sig = mono_method_signature_internal (method); pos = 0; cinfo = cfg->arch.cinfo; @@ -5364,7 +5364,7 @@ void mono_arch_emit_epilog (MonoCompile *cfg) { MonoMethod *method = cfg->method; - MonoMethodSignature *sig = mono_method_signature (method); + MonoMethodSignature *sig = mono_method_signature_internal (method); int i, quad, pos; guint32 stack_to_pop; guint8 *code; diff --git a/mono/mini/mini.c b/mono/mini/mini.c index d3e013c0ebc..0068d8f6ae9 100644 --- a/mono/mini/mini.c +++ b/mono/mini/mini.c @@ -2018,7 +2018,7 @@ mono_compile_create_vars (MonoCompile *cfg) header = cfg->header; - sig = mono_method_signature (cfg->method); + sig = mono_method_signature_internal (cfg->method); if (!MONO_TYPE_IS_VOID (sig->ret)) { cfg->ret = mono_compile_create_var (cfg, sig->ret, OP_ARG); @@ -2460,7 +2460,7 @@ create_jit_info (MonoCompile *cfg, MonoMethod *method_to_compile) if (cfg->arch_eh_jit_info) { MonoJitArgumentInfo *arg_info; - MonoMethodSignature *sig = mono_method_signature (cfg->method_to_register); + MonoMethodSignature *sig = mono_method_signature_internal (cfg->method_to_register); /* * This cannot be computed during stack walking, as diff --git a/mono/mini/simd-intrinsics.c b/mono/mini/simd-intrinsics.c index bad77d6af76..e15f6ff900f 100644 --- a/mono/mini/simd-intrinsics.c +++ b/mono/mini/simd-intrinsics.c @@ -1280,7 +1280,7 @@ simd_intrinsic_emit_binary_op (MonoCompile *cfg, int opcode, int flags, MonoClas static MonoInst* simd_intrinsic_emit_binary (const SimdIntrinsic *intrinsic, MonoCompile *cfg, MonoMethod *cmethod, MonoInst **args) { - MonoMethodSignature *sig = mono_method_signature (cmethod); + MonoMethodSignature *sig = mono_method_signature_internal (cmethod); g_assert (sig->param_count == 2); @@ -1399,7 +1399,7 @@ static MonoInst* simd_intrinsic_emit_setter (const SimdIntrinsic *intrinsic, MonoCompile *cfg, MonoMethod *cmethod, MonoInst **args) { MonoInst *ins; - MonoMethodSignature *sig = mono_method_signature (cmethod); + MonoMethodSignature *sig = mono_method_signature_internal (cmethod); int size, align; gboolean indirect; int dreg; @@ -1528,7 +1528,7 @@ simd_intrinsic_emit_getter_op (MonoCompile *cfg, int index, MonoClass *klass, Mo static MonoInst* simd_intrinsic_emit_getter (const SimdIntrinsic *intrinsic, MonoCompile *cfg, MonoMethod *cmethod, MonoInst **args) { - MonoMethodSignature *sig = mono_method_signature (cmethod); + MonoMethodSignature *sig = mono_method_signature_internal (cmethod); return simd_intrinsic_emit_getter_op (cfg, intrinsic->opcode, cmethod->klass, sig->ret, args [0]); } @@ -1538,7 +1538,7 @@ simd_intrinsic_emit_long_getter (const SimdIntrinsic *intrinsic, MonoCompile *cf { MonoInst *ins; int vreg; - gboolean is_r8 = mono_method_signature (cmethod)->ret->type == MONO_TYPE_R8; + gboolean is_r8 = mono_method_signature_internal (cmethod)->ret->type == MONO_TYPE_R8; vreg = load_simd_vreg (cfg, cmethod, args [0], NULL); @@ -1565,7 +1565,7 @@ simd_intrinsic_emit_ctor (const SimdIntrinsic *intrinsic, MonoCompile *cfg, Mono MonoInst *ins = NULL; int i, addr_reg; gboolean is_ldaddr = (args [0]->opcode == OP_LDADDR && args [0]->inst_left->opcode != OP_ARG); - MonoMethodSignature *sig = mono_method_signature (cmethod); + MonoMethodSignature *sig = mono_method_signature_internal (cmethod); int store_op = mono_type_to_store_membase (cfg, sig->params [0]); int arg_size = mono_type_size (sig->params [0], &i); int opcode; @@ -1657,7 +1657,7 @@ simd_intrinsic_emit_cast (const SimdIntrinsic *intrinsic, MonoCompile *cfg, Mono if (cmethod->is_inflated) /* Vector<T> */ - klass = mono_class_from_mono_type (mono_method_signature (cmethod)->ret); + klass = mono_class_from_mono_type (mono_method_signature_internal (cmethod)->ret); else klass = cmethod->klass; @@ -1761,7 +1761,7 @@ simd_intrinsic_emit_shuffle (const SimdIntrinsic *intrinsic, MonoCompile *cfg, M { MonoInst *ins; int vreg, vreg2 = -1; - int param_count = mono_method_signature (cmethod)->param_count; + int param_count = mono_method_signature_internal (cmethod)->param_count; if (args [param_count - 1]->opcode != OP_ICONST) { /*TODO Shuffle with non literals is not yet supported */ @@ -2088,7 +2088,7 @@ mono_emit_simd_intrinsics (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSign if (!strcmp ("VectorOperations", class_name)) { if (!(cmethod->flags & METHOD_ATTRIBUTE_STATIC)) goto on_exit; - class_name = m_class_get_name (mono_class_from_mono_type (mono_method_signature (cmethod)->params [0])); + class_name = m_class_get_name (mono_class_from_mono_type (mono_method_signature_internal (cmethod)->params [0])); } else if (!m_class_is_simd_type (cmethod->klass)) goto on_exit; @@ -2187,7 +2187,7 @@ static MonoInst* emit_vector_intrinsics (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSignature *fsig, MonoInst **args) { const SimdIntrinsic *intrins; - MonoMethodSignature *sig = mono_method_signature (cmethod); + MonoMethodSignature *sig = mono_method_signature_internal (cmethod); MonoType *type = m_class_get_byval_arg (cmethod->klass); if (!m_class_is_simd_type (cmethod->klass)) @@ -2234,7 +2234,7 @@ emit_vector_intrinsics (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSignatu ins = simd_intrinsic_emit_binary (intrins, cfg, cmethod, args); /* The end result is in the lowest element */ - return simd_intrinsic_emit_getter_op (cfg, 0, cmethod->klass, mono_method_signature (cmethod)->ret, ins); + return simd_intrinsic_emit_getter_op (cfg, 0, cmethod->klass, mono_method_signature_internal (cmethod)->ret, ins); } break; case SN_Abs: { diff --git a/mono/mini/trace.c b/mono/mini/trace.c index 51ab0a52035..512b0d44e92 100644 --- a/mono/mini/trace.c +++ b/mono/mini/trace.c @@ -166,7 +166,7 @@ mono_trace_enter_method (MonoMethod *method, char *ebp) goto unlock; } - sig = mono_method_signature (method); + sig = mono_method_signature_internal (method); arg_info = g_newa (MonoJitArgumentInfo, sig->param_count + 1); @@ -185,13 +185,13 @@ mono_trace_enter_method (MonoMethod *method, char *ebp) mono_arch_get_argument_info (sig, sig->param_count, arg_info); - if (MONO_TYPE_ISSTRUCT (mono_method_signature (method)->ret)) { - g_assert (!mono_method_signature (method)->ret->byref); + if (MONO_TYPE_ISSTRUCT (mono_method_signature_internal (method)->ret)) { + g_assert (!mono_method_signature_internal (method)->ret->byref); printf ("VALUERET:%p, ", *((gpointer *)(ebp + 8))); } - if (mono_method_signature (method)->hasthis) { + if (mono_method_signature_internal (method)->hasthis) { gpointer *this_obj = (gpointer *)(ebp + arg_info [0].offset); if (m_class_is_valuetype (method->klass)) { printf ("value:%p, ", *arg_in_stack_slot(this_obj, gpointer *)); @@ -215,11 +215,11 @@ mono_trace_enter_method (MonoMethod *method, char *ebp) } } - for (i = 0; i < mono_method_signature (method)->param_count; ++i) { + for (i = 0; i < mono_method_signature_internal (method)->param_count; ++i) { gpointer *cpos = (gpointer *)(ebp + arg_info [i + 1].offset); int size = arg_info [i + 1].size; - MonoType *type = mono_method_signature (method)->params [i]; + MonoType *type = mono_method_signature_internal (method)->params [i]; if (type->byref) { printf ("[BYREF:%p], ", *arg_in_stack_slot(cpos, gpointer *)); @@ -348,7 +348,7 @@ mono_trace_leave_method (MonoMethod *method, ...) } } - type = mini_get_underlying_type (mono_method_signature (method)->ret); + type = mini_get_underlying_type (mono_method_signature_internal (method)->ret); switch (type->type) { case MONO_TYPE_VOID: @@ -443,7 +443,7 @@ mono_trace_leave_method (MonoMethod *method, ...) break; } default: - printf ("(unknown return type %x)", mono_method_signature (method)->ret->type); + printf ("(unknown return type %x)", mono_method_signature_internal (method)->ret->type); } //printf (" ip: %p\n", MONO_RETURN_ADDRESS_N (1)); diff --git a/mono/profiler/coverage.c b/mono/profiler/coverage.c index 51f3d63666d..7e2d87bfd10 100644 --- a/mono/profiler/coverage.c +++ b/mono/profiler/coverage.c @@ -277,7 +277,7 @@ dump_method (gpointer key, gpointer value, gpointer userdata) image = mono_class_get_image (klass); image_name = mono_image_get_name (image); - method_signature = mono_signature_get_desc (mono_method_signature (method), TRUE); + method_signature = mono_signature_get_desc (mono_method_signature_internal (method), TRUE); class_name = parse_generic_type_names (mono_type_get_name (m_class_get_byval_arg (klass))); method_name = mono_method_get_name (method); diff --git a/mono/profiler/vtune.c b/mono/profiler/vtune.c index 82ae9d2109f..ba318a24898 100644 --- a/mono/profiler/vtune.c +++ b/mono/profiler/vtune.c @@ -82,7 +82,7 @@ method_jit_done (MonoProfiler *prof, MonoMethod *method, MonoJitInfo* jinfo) MonoDebugSourceLocation *sourceLoc; MonoDebugMethodJitInfo *dmji; MonoClass *klass = mono_method_get_class (method); - char *signature = mono_signature_get_desc (mono_method_signature (method), TRUE); + char *signature = mono_signature_get_desc (mono_method_signature_internal (method), TRUE); char *name = g_strdup_printf ("%s(%s)", mono_method_get_name (method), signature); char *classname = g_strdup_printf ("%s%s%s", m_class_get_name_space (klass), m_class_get_name_space (klass)[0] != 0 ? "::" : "", m_class_get_name (klass)); gpointer code_start = mono_jit_info_get_code_start (jinfo); diff --git a/tools/pedump/pedump.c b/tools/pedump/pedump.c index f2c20398ee4..663524879b3 100644 --- a/tools/pedump/pedump.c +++ b/tools/pedump/pedump.c @@ -378,11 +378,11 @@ dump_verify_info (MonoImage *image, int flags, gboolean valid_only) if (errors) { MonoClass *klass = mono_method_get_class (method); char *name = mono_type_full_name (m_class_get_byval_arg (klass)); - if (mono_method_signature (method) == NULL) { + if (mono_method_signature_internal (method) == NULL) { g_print ("In method: %s::%s(ERROR)\n", name, mono_method_get_name (method)); } else { char *sig; - sig = mono_signature_get_desc (mono_method_signature (method), FALSE); + sig = mono_signature_get_desc (mono_method_signature_internal (method), FALSE); g_print ("In method: %s::%s(%s)\n", name, mono_method_get_name (method), sig); g_free (sig); } |