goto_if_nok (error, return_null);
g_assert (method);
- MonoBoolean is_terminating;
- is_terminating = TRUE;
- gpointer args [2];
- args [0] = MONO_HANDLE_RAW (exc); // FIXMEcoop
- args [1] = &is_terminating;
-
- MonoObjectHandle obj;
- obj = mono_object_new_handle (mono_domain_get (), klass, error);
- goto_if_nok (error, return_null);
+ {
+ MonoBoolean is_terminating = TRUE;
- mono_runtime_invoke_handle_void (method, obj, args, error);
- goto_if_nok (error, return_null);
- return obj;
+ gpointer args [ ] = {
+ MONO_HANDLE_RAW (exc), // FIXMEcoop (ok as long as handles are pinning)
+ &is_terminating
+ };
+
+ MonoObjectHandle obj = mono_object_new_handle (mono_domain_get (), klass, error);
+ goto_if_nok (error, return_null);
+
+ mono_runtime_invoke_handle_void (method, obj, args, error);
+ goto_if_nok (error, return_null);
+ return obj;
+ }
return_null:
return MONO_HANDLE_NEW (MonoObject, NULL);
/* MonoType *type = m_class_get_byval_arg (klass); */
- gpointer args[2];
- args [0] = &klass;
- args [1] = &field;
+ gpointer args [ ] = { &klass, &field };
return mono_runtime_invoke_checked (tp_load, this_obj, args, error);
}
MONO_STATIC_POINTER_INIT_END (MonoMethod, tp_store)
- gpointer args[3];
- args [0] = &klass;
- args [1] = &field;
- args [2] = arg;
+ gpointer args [ ] = { &klass, &field, arg };
mono_runtime_invoke_checked (tp_store, this_obj, args, error);
return is_ok (error);
ctor = m;
}
- void *args [16];
-
MonoReflectionTypeHandle rt;
rt = mono_type_get_object_handle (domain, sig_param, error);
goto_if_nok (error, leave);
}
/* internal RuntimeParameterInfo (string name, Type type, int position, int attrs, object defaultValue, MemberInfo member, MarshalAsAttribute marshalAs) */
- args [0] = MONO_HANDLE_RAW (name_str);
- args [1] = MONO_HANDLE_RAW (rt);
- args [2] = &idx;
- int attrs;
- attrs = sig_param->attrs;
- args [3] = &attrs;
- args [4] = MONO_HANDLE_RAW (def_value);
- args [5] = MONO_HANDLE_RAW (member);
- args [6] = MONO_HANDLE_RAW (mobj);
-
- mono_runtime_invoke_handle_void (ctor, MONO_HANDLE_CAST (MonoObject, param), args, error);
+ {
+ int attrs = sig_param->attrs;
+
+ void *args [ ] = {
+ MONO_HANDLE_RAW (name_str),
+ MONO_HANDLE_RAW (rt),
+ &idx,
+ &attrs,
+ MONO_HANDLE_RAW (def_value),
+ MONO_HANDLE_RAW (member),
+ MONO_HANDLE_RAW (mobj)
+ };
+
+ mono_runtime_invoke_handle_void (ctor, MONO_HANDLE_CAST (MonoObject, param), args, error);
+ }
goto_if_nok (error, leave);
MONO_HANDLE_ARRAY_SETREF (dest, idx, param);
mono_memory_barrier ();
resolve_method = m;
}
- void *args [16];
- args [0] = obj;
+ void *args [ ] = { obj };
obj = mono_runtime_invoke_checked (resolve_method, NULL, args, error);
goto_if_nok (error, return_null);
g_assert (obj);
MonoClass *tclass = mono_class_from_mono_type_internal (mono_class_get_generic_class (klass)->context.class_inst->type_argv [0]);
MonoClass *icomparable, *gcomparer, *icomparable_inst;
MonoGenericContext ctx;
- MonoType *args [16];
memset (&ctx, 0, sizeof (ctx));
icomparable = mono_class_load_from_name (mono_defaults.corlib, "System", "IComparable`1");
- args [0] = m_class_get_byval_arg (tclass);
+ MonoType *args [ ] = { m_class_get_byval_arg (tclass) };
ctx.class_inst = mono_metadata_get_generic_inst (1, args);
icomparable_inst = mono_class_inflate_generic_class_checked (icomparable, &ctx, error);
MonoClass *tclass = mono_class_from_mono_type_internal (mono_class_get_generic_class (klass)->context.class_inst->type_argv [0]);
MonoClass *iface, *gcomparer, *iface_inst;
MonoGenericContext ctx;
- MonoType *args [16];
memset (&ctx, 0, sizeof (ctx));
iface = mono_class_load_from_name (mono_defaults.corlib, "System", "IEquatable`1");
g_assert (iface);
- args [0] = m_class_get_byval_arg (tclass);
+ MonoType *args [ ] = { m_class_get_byval_arg (tclass) };
ctx.class_inst = mono_metadata_get_generic_inst (1, args);
iface_inst = mono_class_inflate_generic_class_checked (iface, &ctx, error);
MonoClass *enum_comparer;
MonoClass *tclass = mono_class_from_mono_type_internal (mono_class_get_generic_class (klass)->context.class_inst->type_argv [0]);
MonoGenericContext ctx;
- MonoType *args [16];
if (m_class_is_enumtype (tclass)) {
MonoClass *enum_comparer_inst;
ERROR_DECL (error);
memset (&ctx, 0, sizeof (ctx));
- args [0] = m_class_get_byval_arg (tclass);
+ MonoType *args [ ] = { m_class_get_byval_arg (tclass) };
ctx.class_inst = mono_metadata_get_generic_inst (1, args);
enum_comparer = mono_class_load_from_name (mono_defaults.corlib, "System.Collections.Generic", "EnumEqualityComparer`1");
MonoClass *comparer;
MonoClass *tclass = mono_class_from_mono_type_internal (mono_class_get_generic_class (klass)->context.class_inst->type_argv [0]);
MonoGenericContext ctx;
- MonoType *args [16];
if (m_class_is_enumtype (tclass)) {
MonoClass *comparer_inst;
ERROR_DECL (error);
memset (&ctx, 0, sizeof (ctx));
- args [0] = m_class_get_byval_arg (tclass);
+ MonoType *args [ ] = { m_class_get_byval_arg (tclass) };
ctx.class_inst = mono_metadata_get_generic_inst (1, args);
comparer = mono_class_load_from_name (mono_defaults.corlib, "System.Collections.Generic", "ObjectComparer`1");
{
int i;
MonoGenericContext ctx;
- MonoType *args [16];
if (acfg->aot_opts.no_instances)
return;
for (i = 0; i < ninsts; ++i) {
ERROR_DECL (error);
MonoClass *generic_inst;
- args [0] = insts [i];
+ MonoType *args [ ] = { insts [i] };
ctx.class_inst = mono_metadata_get_generic_inst (1, args);
generic_inst = mono_class_inflate_generic_class_checked (klass, &ctx, error);
mono_error_assert_ok (error); /* FIXME don't swallow the error */
MonoMethod *m;
const char *prefix;
MonoGenericContext ctx;
- MonoType *args [16];
char *mname, *iname, *s, *s2, *helper_name = NULL;
prefix = "System.Collections.Generic";
if (m->is_generic) {
ERROR_DECL (error);
memset (&ctx, 0, sizeof (ctx));
- args [0] = m_class_get_byval_arg (m_class_get_element_class (method->klass));
+ MonoType *args [ ] = { m_class_get_byval_arg (m_class_get_element_class (method->klass)) };
ctx.method_inst = mono_metadata_get_generic_inst (1, args);
m = mono_class_inflate_generic_method_checked (m, &ctx, error);
g_assert (is_ok (error)); /* FIXME don't swallow the error */
gpointer builder = get_async_method_builder (frame);
g_assert (builder);
- void* args [1];
- gboolean arg = TRUE;
- ERROR_DECL (error);
- args [0] = &arg;
MonoMethod* method = get_set_notification_method (mono_class_from_mono_type_internal (builder_field->type));
if (method == NULL)
return FALSE;
+ gboolean arg = TRUE;
+ ERROR_DECL (error);
+ void *args [ ] = { &arg };
mono_runtime_invoke_checked (method, builder, args, error);
mono_error_assert_ok (error);
return TRUE;
static MonoInst*
emit_rgctx_fetch_inline (MonoCompile *cfg, MonoInst *rgctx, MonoJumpInfoRgctxEntry *entry)
{
- MonoInst *args [16];
MonoInst *call;
// FIXME: No fastpath since the slot is not a compile time constant
- args [0] = rgctx;
+ MonoInst *args [2] = { rgctx };
EMIT_NEW_AOTCONST (cfg, args [1], MONO_PATCH_INFO_RGCTX_SLOT_INDEX, entry);
if (entry->in_mrgctx)
call = mono_emit_jit_icall (cfg, mono_fill_method_rgctx, args);
if (context_used) {
MonoInst *data;
MonoRgctxInfoType rgctx_info;
- MonoInst *iargs [2];
gboolean known_instance_size = !mini_is_gsharedvt_klass (klass);
MonoMethod *managed_alloc = mono_gc_get_managed_allocator (klass, for_box, known_instance_size);
}
}
if (supported) {
- MonoInst *args [16];
+ MonoInst *args [5];
/*
* This case handles calls to
MonoType *param_type = mono_class_get_generic_class (cmethod->klass)->context.class_inst->type_argv [0];
MonoClass *inst;
MonoGenericContext ctx;
- MonoType *args [16];
ERROR_DECL (error);
memset (&ctx, 0, sizeof (ctx));
- args [0] = param_type;
+ MonoType *args [ ] = { param_type };
ctx.class_inst = mono_metadata_get_generic_inst (1, args);
inst = mono_class_inflate_generic_class_checked (mono_class_get_iequatable_class (), &ctx, error);
} else {
#ifdef MONO_ARCH_SOFT_FLOAT_FALLBACK
if (COMPILE_SOFT_FLOAT (cfg) && !ret_type->byref && ret_type->type == MONO_TYPE_R4) {
- MonoInst *iargs [1];
MonoInst *conv;
- iargs [0] = val;
+ MonoInst *iargs [ ] = { val };
conv = mono_emit_jit_icall (cfg, mono_fload_r4_arg, iargs);
mono_arch_emit_setret (cfg, cfg->method, conv);
} else {
MonoInst *val = sp [fsig->param_count];
if (val->type == STACK_OBJ) {
- MonoInst *iargs [2];
-
- iargs [0] = sp [0];
- iargs [1] = val;
-
+ MonoInst *iargs [ ] = { sp [0], val };
mono_emit_jit_icall (cfg, mono_helper_stelem_ref_check, iargs);
}