return res;
case MONO_WRAPPER_MANAGED_TO_NATIVE:
info = mono_marshal_get_wrapper_info (wrapper);
- if (info && (info->subtype == WRAPPER_SUBTYPE_NONE || info->subtype == WRAPPER_SUBTYPE_NATIVE_FUNC_AOT))
+ if (info && (info->subtype == WRAPPER_SUBTYPE_NONE || info->subtype == WRAPPER_SUBTYPE_NATIVE_FUNC_AOT || info->subtype == WRAPPER_SUBTYPE_PINVOKE))
return info->d.managed_to_native.method;
else
return NULL;
invoke_sig = static_sig;
if (static_method_with_first_arg_bound)
- name = mono_signature_to_name (invoke_sig, "invoke_bound_");
+ name = mono_signature_to_name (invoke_sig, "invoke_bound");
+ else if (closed_over_null)
+ name = mono_signature_to_name (invoke_sig, "invoke_closed_over_null");
+ else if (callvirt)
+ name = mono_signature_to_name (invoke_sig, "invoke_callvirt");
else
name = mono_signature_to_name (sig, "invoke");
if (ctx)
mb, csig, csig->param_count + 16);
mono_mb_free (mb);
- info = mono_wrapper_info_create (res, WRAPPER_SUBTYPE_NONE);
+ info = mono_wrapper_info_create (res, WRAPPER_SUBTYPE_PINVOKE);
info->d.managed_to_native.method = method;
mono_marshal_set_wrapper_info (res, info);
layout = (klass->flags & TYPE_ATTRIBUTE_LAYOUT_MASK);
- if (layout == TYPE_ATTRIBUTE_AUTO_LAYOUT) {
+ if (type->type == MONO_TYPE_PTR || type->type == MONO_TYPE_FNPTR) {
+ return sizeof (gpointer);
+ } else if (layout == TYPE_ATTRIBUTE_AUTO_LAYOUT) {
gchar *msg;
MonoException *exc;