mono_emit_method_call_full (MonoCompile *cfg, MonoMethod *method, MonoMethodSignature *sig,
MonoInst **args, MonoInst *this, MonoInst *imt_arg, MonoInst *rgctx_arg)
{
- gboolean might_be_remote;
+ gboolean might_be_remote = FALSE;
gboolean virtual = this != NULL;
gboolean enable_for_aot = TRUE;
int context_used;
context_used = mini_method_check_context_used (cfg, method);
+#ifndef DISABLE_REMOTING
might_be_remote = this && sig->hasthis &&
(mono_class_is_marshalbyref (method->klass) || method->klass == mono_defaults.object_class) &&
!(method->flags & METHOD_ATTRIBUTE_VIRTUAL) && (!MONO_CHECK_THIS (this) || context_used);
return mono_emit_calli (cfg, sig, args, addr, NULL, NULL);
}
+#endif
need_unbox_trampoline = method->klass == mono_defaults.object_class || (method->klass->flags & TYPE_ATTRIBUTE_INTERFACE);
call = mono_emit_call_args (cfg, sig, args, FALSE, virtual, FALSE, rgctx_arg ? TRUE : FALSE, need_unbox_trampoline);
+#ifndef DISABLE_REMOTING
if (might_be_remote)
call->method = mono_marshal_get_remoting_invoke_with_check (method);
else
+#endif
call->method = method;
call->inst.flags |= MONO_INST_HAS_METHOD;
call->inst.inst_left = this;
* the method is not virtual, we just need to ensure this is not null
* and then we can call the method directly.
*/
+#ifndef DISABLE_REMOTING
if (mono_class_is_marshalbyref (method->klass) || method->klass == mono_defaults.object_class) {
/*
* The check above ensures method is not gshared, this is needed since
*/
method = call->method = mono_marshal_get_remoting_invoke_with_check (method);
}
+#endif
if (!method->string_ctor)
MONO_EMIT_NEW_CHECK_THIS (cfg, this_reg);
if (op == CEE_STFLD) {
if (target_type_is_incompatible (cfg, field->type, sp [1]))
UNVERIFIED;
+#ifndef DISABLE_REMOTING
if ((mono_class_is_marshalbyref (klass) && !MONO_CHECK_THIS (sp [0])) || mono_class_is_contextbound (klass) || klass == mono_defaults.marshalbyrefobject_class) {
MonoMethod *stfld_wrapper = mono_marshal_get_stfld_wrapper (field->type);
MonoInst *iargs [5];
} else {
mono_emit_method_call (cfg, stfld_wrapper, iargs, NULL);
}
- } else {
+ } else
+#endif
+ {
MonoInst *store;
MONO_EMIT_NULL_CHECK (cfg, sp [0]->dreg);
break;
}
+#ifndef DISABLE_REMOTING
if (is_instance && ((mono_class_is_marshalbyref (klass) && !MONO_CHECK_THIS (sp [0])) || mono_class_is_contextbound (klass) || klass == mono_defaults.marshalbyrefobject_class)) {
MonoMethod *wrapper = (op == CEE_LDFLDA) ? mono_marshal_get_ldflda_wrapper (field->type) : mono_marshal_get_ldfld_wrapper (field->type);
MonoInst *iargs [4];
ins = mono_emit_method_call (cfg, wrapper, iargs, NULL);
*sp++ = ins;
}
- } else if (is_instance) {
+ } else
+#endif
+ if (is_instance) {
if (sp [0]->type == STACK_VTYPE) {
MonoInst *var;