return result;
}
-#ifndef DISABLE_JIT
+#ifdef HAVE_ONLINE_VES
/*
* mono_mb_emit_exception_marshal_directive:
}
mono_mb_emit_exception_full (mb, "System.Runtime.InteropServices", "MarshalDirectiveException", s);
}
-
-#endif /* !DISABLE_JIT */
+#endif /* HAVE_ONLINE_VES */
guint
mono_type_to_ldind (MonoType *type)
return -1;
}
-#ifndef DISABLE_JIT
+#ifdef HAVE_ONLINE_VES
static void
emit_ptr_to_object_conv (MonoMethodBuilder *mb, MonoType *type, MonoMarshalConv conv, MonoMarshalSpec *mspec)
emit_thread_force_interrupt_checkpoint (mb);
}
-#endif /* DISABLE_JIT */
+#endif /* HAVE_ONLINE_VES */
/* This is a JIT icall, it sets the pending exception and returns NULL on error. */
static MonoAsyncResult *
return result;
}
-#ifndef DISABLE_JIT
+#ifdef HAVE_ONLINE_VES
int
mono_mb_emit_save_args (MonoMethodBuilder *mb, MonoMethodSignature *sig, gboolean save_this)
return params_var;
}
-#endif /* DISABLE_JIT */
+#endif /* HAVE_ONLINE_VES */
static char*
mono_signature_to_name (MonoMethodSignature *sig, const char *prefix)
mb = mono_mb_new (get_wrapper_target_class (method->klass->image), name, MONO_WRAPPER_DELEGATE_BEGIN_INVOKE);
g_free (name);
-#ifndef DISABLE_JIT
+#ifdef HAVE_ONLINE_VES
params_var = mono_mb_emit_save_args (mb, sig, FALSE);
mono_mb_emit_ldarg (mb, 0);
return res;
}
-#ifndef DISABLE_JIT
+#ifdef HAVE_ONLINE_VES
void
mono_mb_emit_restore_result (MonoMethodBuilder *mb, MonoType *return_type)
mono_mb_emit_byte (mb, CEE_RET);
}
-#endif /* DISABLE_JIT */
+#endif /* HAVE_ONLINE_VES */
/**
* mono_marshal_get_delegate_end_invoke:
mb = mono_mb_new (get_wrapper_target_class (method->klass->image), name, MONO_WRAPPER_DELEGATE_END_INVOKE);
g_free (name);
-#ifndef DISABLE_JIT
+#ifdef HAVE_ONLINE_VES
params_var = mono_mb_emit_save_args (mb, sig, FALSE);
mono_mb_emit_ldarg (mb, 0);
mb = mono_mb_new (get_wrapper_target_class (method->klass->image), name, MONO_WRAPPER_DELEGATE_INVOKE);
g_free (name);
-#ifndef DISABLE_JIT
+#ifdef HAVE_ONLINE_VES
void_ret = sig->ret->type == MONO_TYPE_VOID && !method->string_ctor;
/* allocate local 0 (object) */
mono_mb_emit_byte (mb, CEE_RET);
mb->skip_visibility = 1;
-#endif /* DISABLE_JIT */
+#endif /* HAVE_ONLINE_VES */
info = mono_wrapper_info_create (mb, subtype);
info->d.delegate_invoke.method = method;
return mono_metadata_signature_equal (sig1, sig2);
}
-#ifndef DISABLE_JIT
+#ifdef HAVE_ONLINE_VES
/*
* emit_invoke_call:
mb = mono_mb_new (target_klass, name, MONO_WRAPPER_RUNTIME_INVOKE);
g_free (name);
-#ifndef DISABLE_JIT
+#ifdef HAVE_ONLINE_VES
param_names [0] = "this";
param_names [1] = "params";
param_names [2] = "exc";
#endif
if (need_direct_wrapper) {
-#ifndef DISABLE_JIT
+#ifdef HAVE_ONLINE_VES
mb->skip_visibility = 1;
#endif
info = mono_wrapper_info_create (mb, virtual_ ? WRAPPER_SUBTYPE_RUNTIME_INVOKE_VIRTUAL : WRAPPER_SUBTYPE_RUNTIME_INVOKE_DIRECT);
mb = mono_mb_new (mono_defaults.object_class, name, MONO_WRAPPER_RUNTIME_INVOKE);
g_free (name);
-#ifndef DISABLE_JIT
+#ifdef HAVE_ONLINE_VES
/* allocate local 0 (object) tmp */
mono_mb_add_local (mb, &mono_defaults.object_class->byval_arg);
/* allocate local 1 (object) exc */
mono_mb_patch_branch (mb, pos);
//mono_mb_emit_ldloc (mb, 0);
mono_mb_emit_byte (mb, CEE_RET);
-#endif /* DISABLE_JIT */
+#endif /* HAVE_ONLINE_VES */
info = mono_wrapper_info_create (mb, WRAPPER_SUBTYPE_RUNTIME_INVOKE_DYNAMIC);
mb = mono_mb_new (mono_defaults.object_class, name, MONO_WRAPPER_RUNTIME_INVOKE);
g_free (name);
-#ifndef DISABLE_JIT
+#ifdef HAVE_ONLINE_VES
param_names [0] = "this";
param_names [1] = "params";
param_names [2] = "exc";
return res;
}
-#ifndef DISABLE_JIT
+#ifdef HAVE_ONLINE_VES
static void
mono_mb_emit_auto_layout_exception (MonoMethodBuilder *mb, MonoClass *klass)
{
else
csig2 = mono_metadata_signature_dup_full (mono_defaults.corlib, sig);
-#ifndef DISABLE_JIT
+#ifdef HAVE_ONLINE_VES
if (sig->hasthis)
mono_mb_emit_byte (mb, CEE_LDARG_0);
int conv_arg, MonoType **conv_arg_type,
MarshalAction action)
{
-#ifdef DISABLE_JIT
+#ifndef HAVE_ONLINE_VES
if (action == MARSHAL_ACTION_CONV_IN && t->type == MONO_TYPE_VALUETYPE)
*conv_arg_type = &mono_defaults.int_class->byval_arg;
return conv_arg;
int conv_arg, MonoType **conv_arg_type,
MarshalAction action)
{
-#ifndef DISABLE_JIT
+#ifdef HAVE_ONLINE_VES
MonoMethodBuilder *mb = m->mb;
switch (action) {
int conv_arg, MonoType **conv_arg_type,
MarshalAction action)
{
-#ifndef DISABLE_JIT
+#ifdef HAVE_ONLINE_VES
MonoMethodBuilder *mb = m->mb;
MonoClass *klass, *date_time_class;
int pos = 0, pos2;
int conv_arg, MonoType **conv_arg_type,
MarshalAction action)
{
-#ifdef DISABLE_JIT
+#ifndef HAVE_ONLINE_VES
switch (action) {
case MARSHAL_ACTION_CONV_IN:
*conv_arg_type = &mono_defaults.int_class->byval_arg;
MonoMarshalSpec *spec, int conv_arg,
MonoType **conv_arg_type, MarshalAction action)
{
-#ifdef DISABLE_JIT
+#ifndef HAVE_ONLINE_VES
if (action == MARSHAL_ACTION_CONV_IN)
*conv_arg_type = &mono_defaults.int_class->byval_arg;
#else
MonoMarshalSpec *spec, int conv_arg,
MonoType **conv_arg_type, MarshalAction action)
{
-#ifdef DISABLE_JIT
+#ifndef HAVE_ONLINE_VES
if (action == MARSHAL_ACTION_CONV_IN)
*conv_arg_type = &mono_defaults.int_class->byval_arg;
#else
int conv_arg, MonoType **conv_arg_type,
MarshalAction action)
{
-#ifdef DISABLE_JIT
+#ifndef HAVE_ONLINE_VES
if (action == MARSHAL_ACTION_CONV_IN)
*conv_arg_type = &mono_defaults.int_class->byval_arg;
#else
return conv_arg;
}
-#ifndef DISABLE_JIT
-
+#ifdef HAVE_ONLINE_VES
#ifndef DISABLE_COM
static int
}
#endif /* DISABLE_COM */
-#endif /* DISABLE_JIT */
+#endif /* HAVE_ONLINE_VES */
static gboolean
mono_pinvoke_is_unicode (MonoMethodPInvoke *piinfo)
int conv_arg, MonoType **conv_arg_type,
MarshalAction action)
{
-#ifdef DISABLE_JIT
+#ifndef HAVE_ONLINE_VES
switch (action) {
case MARSHAL_ACTION_CONV_IN:
*conv_arg_type = &mono_defaults.object_class->byval_arg;
int conv_arg, MonoType **conv_arg_type,
MarshalAction action)
{
-#ifdef DISABLE_JIT
+#ifndef HAVE_ONLINE_VES
switch (action) {
case MARSHAL_ACTION_CONV_IN:
if (t->byref)
MonoMarshalSpec *spec, int conv_arg,
MonoType **conv_arg_type, MarshalAction action)
{
-#ifndef DISABLE_JIT
+#ifdef HAVE_ONLINE_VES
MonoMethodBuilder *mb = m->mb;
switch (action) {
MonoMarshalSpec *spec, int conv_arg,
MonoType **conv_arg_type, MarshalAction action)
{
-#ifndef DISABLE_JIT
+#ifdef HAVE_ONLINE_VES
MonoMethodBuilder *mb = m->mb;
switch (action) {
MonoMarshalSpec *spec, int conv_arg,
MonoType **conv_arg_type, MarshalAction action)
{
-#ifndef DISABLE_JIT
+#ifdef HAVE_ONLINE_VES
MonoMethodBuilder *mb = m->mb;
switch (action) {
return emit_marshal_string (m, argnum, t, spec, conv_arg, conv_arg_type, action);
case MONO_TYPE_CLASS:
case MONO_TYPE_OBJECT:
-#if !defined(DISABLE_COM) && !defined(DISABLE_JIT)
+#if !defined(DISABLE_COM) && defined(HAVE_ONLINE_VES)
if (spec && spec->native == MONO_NATIVE_STRUCT)
return emit_marshal_variant (m, argnum, t, spec, conv_arg, conv_arg_type, action);
#endif
}
-#ifndef DISABLE_JIT
+#ifdef HAVE_ONLINE_VES
/**
* mono_marshal_emit_native_wrapper:
* \param image the image to use for looking up custom marshallers
mono_mb_emit_byte (mb, CEE_RET);
}
-#endif /* DISABLE_JIT */
+#endif /* HAVE_ONLINE_VES */
/**
* mono_marshal_get_native_wrapper:
/* create a wrapper to preserve .ctor in stack trace */
mb = mono_mb_new (method->klass, method->name, MONO_WRAPPER_MANAGED_TO_MANAGED);
-#ifndef DISABLE_JIT
+#ifdef HAVE_ONLINE_VES
mono_mb_emit_byte (mb, CEE_LDARG_0);
for (i = 1; i <= csig->param_count; i++)
mono_mb_emit_ldarg (mb, i);
* registered in the runtime doing the AOT compilation.
*/
if (!piinfo->addr && !aot) {
-#ifndef DISABLE_JIT
+#ifdef HAVE_ONLINE_VES
mono_mb_emit_exception (mb, exc_class, exc_arg);
#endif
info = mono_wrapper_info_create (mb, WRAPPER_SUBTYPE_NONE);
if (method->string_ctor)
csig->ret = &mono_defaults.string_class->byval_arg;
-#ifndef DISABLE_JIT
+#ifdef HAVE_ONLINE_VES
// FIXME:
MonoClass *handle_stack_mark_class;
MonoClass *error_class;
if (!aot)
g_assert (piinfo->addr);
-#ifndef DISABLE_JIT
+#ifdef HAVE_ONLINE_VES
mspecs = g_new (MonoMarshalSpec*, sig->param_count + 1);
mono_method_get_marshal_info (method, mspecs);
info, NULL);
mono_mb_free (mb);
-#ifndef DISABLE_JIT
+#ifdef HAVE_ONLINE_VES
for (i = sig->param_count; i >= 0; i--)
if (mspecs [i])
mono_metadata_free_marshal_spec (mspecs [i]);
mb = mono_mb_new (mono_defaults.object_class, name, MONO_WRAPPER_MANAGED_TO_NATIVE);
mb->method->save_lmf = 1;
-#ifndef DISABLE_JIT
+#ifdef HAVE_ONLINE_VES
mono_marshal_emit_native_wrapper (image, mb, sig, piinfo, mspecs, func, FALSE, TRUE, FALSE);
#endif
mb = mono_mb_new (invoke->klass, name, MONO_WRAPPER_MANAGED_TO_NATIVE);
mb->method->save_lmf = 1;
-#ifndef DISABLE_JIT
+#ifdef HAVE_ONLINE_VES
mono_marshal_emit_native_wrapper (image, mb, sig, piinfo, mspecs, NULL, FALSE, TRUE, TRUE);
#endif
void
mono_marshal_emit_managed_wrapper (MonoMethodBuilder *mb, MonoMethodSignature *invoke_sig, MonoMarshalSpec **mspecs, EmitMarshalContext* m, MonoMethod *method, uint32_t target_handle)
{
-#ifdef DISABLE_JIT
+#ifndef HAVE_ONLINE_VES
MonoMethodSignature *sig, *csig;
int i;
mb, csig, sig->param_count + 16,
info, NULL);
} else {
-#ifndef DISABLE_JIT
+#ifdef HAVE_ONLINE_VES
mb->dynamic = TRUE;
#endif
res = mono_mb_create (mb, csig, sig->param_count + 16, NULL);
mono_marshal_emit_managed_wrapper (mb, sig, mspecs, &m, method, 0);
-#ifndef DISABLE_JIT
+#ifdef HAVE_ONLINE_VES
mb->dynamic = TRUE;
#endif
method = mono_mb_create (mb, csig, sig->param_count + 16, NULL);
mb = mono_mb_new (method->klass, method->name, MONO_WRAPPER_MANAGED_TO_MANAGED);
param_count = sig->param_count + sig->hasthis;
-#ifndef DISABLE_JIT
+#ifdef HAVE_ONLINE_VES
for (i = 0; i < param_count; i++)
mono_mb_emit_ldarg (mb, i);
return compiled_ptr;
}
-#ifndef DISABLE_JIT
+#ifdef HAVE_ONLINE_VES
/*
* The code directly following this is the cache hit, value positive branch
mono_mb_emit_icall (mb, mono_marshal_isinst_with_cache);
}
-#endif /* DISABLE_JIT */
+#endif /* HAVE_ONLINE_VES */
/**
* mono_marshal_get_castclass_with_cache:
sig->ret = &mono_defaults.object_class->byval_arg;
sig->pinvoke = 0;
-#ifndef DISABLE_JIT
+#ifdef HAVE_ONLINE_VES
generate_check_cache (obj_arg_position, class_arg_position, cache_arg_position,
&return_null_pos, &negative_cache_hit_pos, &positive_cache_hit_pos, mb);
invalid_cast_pos = mono_mb_emit_branch (mb, CEE_BRFALSE);
mono_mb_patch_branch (mb, return_null_pos);
mono_mb_emit_byte (mb, CEE_LDNULL);
mono_mb_emit_byte (mb, CEE_RET);
-#endif /* DISABLE_JIT */
+#endif /* HAVE_ONLINE_VES */
info = mono_wrapper_info_create (mb, WRAPPER_SUBTYPE_CASTCLASS_WITH_CACHE);
res = mono_mb_create (mb, sig, 8, info);
sig->ret = &mono_defaults.object_class->byval_arg;
sig->pinvoke = 0;
-#ifndef DISABLE_JIT
+#ifdef HAVE_ONLINE_VES
generate_check_cache (obj_arg_position, class_arg_position, cache_arg_position,
&return_null_pos, &negative_cache_hit_pos, &positive_cache_hit_pos, mb);
// Return the object gotten via the slow path.
mb = mono_mb_new (klass, stoptr->name, MONO_WRAPPER_UNKNOWN);
-#ifndef DISABLE_JIT
+#ifdef HAVE_ONLINE_VES
if (klass->blittable) {
mono_mb_emit_byte (mb, CEE_LDARG_1);
mono_mb_emit_byte (mb, CEE_LDARG_0);
mb = mono_mb_new (klass, "PtrToStructure", MONO_WRAPPER_UNKNOWN);
-#ifndef DISABLE_JIT
+#ifdef HAVE_ONLINE_VES
if (klass->blittable) {
mono_mb_emit_byte (mb, CEE_LDARG_1);
mono_mb_emit_ldflda (mb, sizeof (MonoObject));
}
mb = mono_mb_new (method->klass, method->name, MONO_WRAPPER_UNKNOWN);
-#ifndef DISABLE_JIT
+#ifdef HAVE_ONLINE_VES
mono_mb_emit_exception_full (mb, "System", "ExecutionEngineException", "Shouldn't be called.");
mono_mb_emit_byte (mb, CEE_RET);
#endif
info = mono_wrapper_info_create (mb, WRAPPER_SUBTYPE_NONE);
info->d.synchronized.method = method;
-#ifndef DISABLE_JIT
+#ifdef HAVE_ONLINE_VES
mb->skip_visibility = 1;
/* result */
if (!MONO_TYPE_IS_VOID (sig->ret))
if (method->klass->valuetype && !(method->flags & MONO_METHOD_ATTR_STATIC)) {
/* FIXME Is this really the best way to signal an error here? Isn't this called much later after class setup? -AK */
mono_class_set_type_load_failure (method->klass, "");
-#ifndef DISABLE_JIT
+#ifdef HAVE_ONLINE_VES
/* This will throw the type load exception when the wrapper is compiled */
mono_mb_emit_byte (mb, CEE_LDNULL);
mono_mb_emit_op (mb, CEE_ISINST, method->klass);
return res;
}
-#ifndef DISABLE_JIT
+#ifdef HAVE_ONLINE_VES
/* this */
this_local = mono_mb_add_local (mb, &mono_defaults.object_class->byval_arg);
taken_local = mono_mb_add_local (mb, &mono_defaults.boolean_class->byval_arg);
mono_marshal_unlock ();
-#ifndef DISABLE_JIT
+#ifdef HAVE_ONLINE_VES
/* Push this or the type object */
if (method->flags & METHOD_ATTRIBUTE_STATIC) {
/* We have special handling for this in the JIT */
g_assert (sig->hasthis);
-#ifndef DISABLE_JIT
+#ifdef HAVE_ONLINE_VES
mono_mb_emit_ldarg (mb, 0);
mono_mb_emit_icon (mb, sizeof (MonoObject));
mono_mb_emit_byte (mb, CEE_ADD);
return STELEMREF_CLASS;
}
-#ifndef DISABLE_JIT
+#ifdef HAVE_ONLINE_VES
static void
load_array_element_address (MonoMethodBuilder *mb)
signature = sig;
}
-#ifndef DISABLE_JIT
+#ifdef HAVE_ONLINE_VES
param_names [0] = "index";
param_names [1] = "value";
mono_mb_set_param_names (mb, param_names);
mono_mb_emit_byte (mb, CEE_RET);
g_assert (0);
}
-#endif /* DISABLE_JIT */
+#endif /* HAVE_ONLINE_VES */
info = mono_wrapper_info_create (mb, WRAPPER_SUBTYPE_VIRTUAL_STELEMREF);
info->d.virtual_stelemref.kind = kind;
res = mono_mb_create (mb, signature, 4, info);
sig->params [1] = &mono_defaults.int_class->byval_arg; /* this is a natural sized int */
sig->params [2] = &mono_defaults.object_class->byval_arg;
-#ifndef DISABLE_JIT
+#ifdef HAVE_ONLINE_VES
aklass = mono_mb_add_local (mb, &mono_defaults.int_class->byval_arg);
vklass = mono_mb_add_local (mb, &mono_defaults.int_class->byval_arg);
array_slot_addr = mono_mb_add_local (mb, &mono_defaults.object_class->this_arg);
sig = mono_metadata_signature_alloc (mono_defaults.corlib, 0);
sig->ret = &mono_defaults.void_class->byval_arg;
-#ifndef DISABLE_JIT
+#ifdef HAVE_ONLINE_VES
/*
* The body is generated by the JIT, we use a wrapper instead of a trampoline so EH works.
*/
sig = mono_metadata_signature_alloc (mono_defaults.corlib, 0);
sig->ret = &mono_defaults.void_class->byval_arg;
-#ifndef DISABLE_JIT
+#ifdef HAVE_ONLINE_VES
/*
* The body is generated by the JIT, we use a wrapper instead of a trampoline so EH works.
*/
mb = mono_mb_new (mono_defaults.object_class, name, MONO_WRAPPER_MANAGED_TO_MANAGED);
g_free (name);
-#ifndef DISABLE_JIT
+#ifdef HAVE_ONLINE_VES
bounds = mono_mb_add_local (mb, &mono_defaults.int_class->byval_arg);
ind = mono_mb_add_local (mb, &mono_defaults.int32_class->byval_arg);
realidx = mono_mb_add_local (mb, &mono_defaults.int32_class->byval_arg);
mono_mb_emit_exception (mb, "IndexOutOfRangeException", NULL);
g_free (branch_positions);
-#endif /* DISABLE_JIT */
+#endif /* HAVE_ONLINE_VES */
info = mono_wrapper_info_create (mb, WRAPPER_SUBTYPE_ELEMENT_ADDR);
info->d.element_addr.rank = rank;
mb = mono_mb_new (method->klass, method->name, MONO_WRAPPER_UNKNOWN);
-#ifndef DISABLE_JIT
+#ifdef HAVE_ONLINE_VES
/* Call the method */
if (sig->hasthis)
mono_mb_emit_ldarg (mb, 0);
csig = mono_metadata_signature_dup_full (method->klass->image, sig);
csig->generic_param_count = 0;
-#ifndef DISABLE_JIT
+#ifdef HAVE_ONLINE_VES
mono_mb_emit_ldarg (mb, 0);
for (i = 0; i < csig->param_count; i++)
mono_mb_emit_ldarg (mb, i + 1);
if (MONO_TYPE_ISSTRUCT (sig->ret))
csig->ret = &mono_defaults.object_class->byval_arg;
-#ifndef DISABLE_JIT
+#ifdef HAVE_ONLINE_VES
/* local 0 (temp for exception object) */
mono_mb_add_local (mb, &mono_defaults.object_class->byval_arg);