Revert "[runtime] Fixed allowing non-object complex arguments to cgt.un"
authorAlex Rønne Petersen <alexrp@xamarin.com>
Wed, 4 Feb 2015 14:28:44 +0000 (15:28 +0100)
committerAlex Rønne Petersen <alexrp@xamarin.com>
Wed, 4 Feb 2015 14:28:44 +0000 (15:28 +0100)
This reverts commit 38f878ce9d480e2f9ba8a00ac699bed98d71354c.

This broke the build: http://wrench.mono-project.com/Wrench/WebServices/Download.aspx?workfile_id=3704132

mono/metadata/verify.c

index ee9b3e3024aa1ca41b1b8a6a1b9b4f05022e23a9..af2c288dcc7b2a0922a6998ed7a2a407e5af3869 100644 (file)
@@ -3058,12 +3058,7 @@ do_cmp_op (VerifyContext *ctx, const unsigned char table [TYPE_MAX][TYPE_MAX], g
        a = stack_pop (ctx);
 
        if (opcode == CEE_CGT_UN) {
-               // ECMA-335:
-               // cgt.un is allowed and verifiable on ObjectRefs (O). This is commonly used when
-               // comparing an ObjectRef with null
-               if (stack_slot_get_type (a) == TYPE_COMPLEX && a->type->type == MONO_TYPE_OBJECT &&
-                       stack_slot_get_type (b) == TYPE_COMPLEX && b->type->type == MONO_TYPE_OBJECT) {
-
+               if (stack_slot_get_type (a) == TYPE_COMPLEX && stack_slot_get_type (b) == TYPE_COMPLEX) {
                        stack_push_val (ctx, TYPE_I4, &mono_defaults.int32_class->byval_arg);
                        return;
                }