- CACHE_OBJECT (MonoArray *, &(method->signature), res, refclass);
+ return res;
+}
+
+/*
+ * mono_param_get_objects:
+ * @domain: an app domain
+ * @method: a method
+ *
+ * Return an System.Reflection.ParameterInfo array object representing the parameters
+ * in the method @method.
+ */
+MonoArray*
+mono_param_get_objects_internal (MonoDomain *domain, MonoMethod *method, MonoClass *refclass, MonoError *error)
+{
+ mono_error_init (error);
+
+ MonoMethodSignature *sig = mono_method_signature_checked (method, error);
+ if (!mono_error_ok (error))
+ goto leave;
+
+ if (!sig->param_count) {
+ MonoArray *res = mono_array_new_checked (domain, mono_class_get_mono_parameter_info_class (), 0, error);
+ if (!res)
+ goto leave;
+
+ return res;
+ }
+
+ /* Note: the cache is based on the address of the signature into the method
+ * since we already cache MethodInfos with the method as keys.
+ */
+ return CHECK_OR_CONSTRUCT (MonoArray*, &method->signature, refclass, param_objects_construct, method);
+leave:
+ return NULL;