return FALSE;
break;
}
+ default:
+ break;
}
return TRUE;
}
* is it a "class Foo<T>" or a "struct Foo<T>"?
*/
return !arg->type->data.generic_class->container_class->valuetype;
+ default:
+ return FALSE;
}
default:
return FALSE;
if (drop_byref)
return verify_type_compatibility_full (ctx, type, mono_type_get_type_byval (candidate), FALSE);
+ /* Handle how Roslyn emit fixed statements by encoding it as byref */
+ if (type->byref && candidate->byref && (type->type == MONO_TYPE_I) && !mono_type_is_reference (candidate)) {
+ if (!IS_STRICT_MODE (ctx))
+ return TRUE;
+ }
+
return verify_type_compatibility_full (ctx, type, candidate, FALSE);
}
case MONO_TYPE_PTR:
case MONO_TYPE_TYPEDBYREF:
CODE_NOT_VERIFIABLE (ctx, g_strdup_printf ("Invalid value for %s at 0x%04x", opcode, ctx->ip_offset));
+ default:
+ break;
}
do_box = is_boxed || mono_type_is_generic_argument(type) || mono_class_from_mono_type (type)->valuetype;
static void
do_localloc (VerifyContext *ctx)
{
- ILStackDesc *top;
-
if (ctx->eval.size != 1) {
ADD_VERIFY_ERROR (ctx, g_strdup_printf ("Stack must have only size item in localloc at 0x%04x", ctx->ip_offset));
return;
}
/*TODO verify top type*/
- top = stack_pop (ctx);
+ /* top = */ stack_pop (ctx);
set_stack_value (ctx, stack_push (ctx), &mono_defaults.int_class->byval_arg, FALSE);
CODE_NOT_VERIFIABLE (ctx, g_strdup_printf ("Instruction localloc in never verifiable at 0x%04x", ctx->ip_offset));
MonoSimpleBasicBlock *bb = NULL, *original_bb = NULL;
int i, n, need_merge = 0, start = 0;
- guint token, ip_offset = 0, prefix = 0;
+ guint ip_offset = 0, prefix = 0;
MonoGenericContext *generic_context = NULL;
MonoImage *image;
VerifyContext ctx;
code_bounds_check (5);
if (ctx.eval.size)
ADD_VERIFY_ERROR (&ctx, g_strdup_printf ("Eval stack must be empty in jmp at 0x%04x", ip_offset));
- token = read32 (ip + 1);
+ /* token = read32 (ip + 1); */
if (in_any_block (ctx.header, ip_offset))
ADD_VERIFY_ERROR (&ctx, g_strdup_printf ("jmp cannot escape exception blocks at 0x%04x", ip_offset));
case CEE_CALLI:
code_bounds_check (5);
- token = read32 (ip + 1);
+ /* token = read32 (ip + 1); */
/*
* FIXME: check signature, retval, arguments etc.
* FIXME: check requirements for tail call