[interp] transform all kind of clauses
authorBernhard Urban <bernhard.urban@xamarin.com>
Tue, 7 Mar 2017 09:46:58 +0000 (10:46 +0100)
committerBernhard Urban <bernhard.urban@xamarin.com>
Wed, 8 Mar 2017 22:02:51 +0000 (23:02 +0100)
still need to handle filter clauses correctly during stack walking.

mono/mini/iltests.il
mono/mini/interp/interp.c
mono/mini/interp/transform.c

index dfad419f4ddaf90194be6d253f77979468ce8cd4..eaa120f78d7eb9fbac055a83ab40891404e81f12 100644 (file)
@@ -1249,7 +1249,7 @@ COND:   ldloc.0
 
        .method public static int32 test_1_filters () {
                .custom instance void [TestDriver]CategoryAttribute::.ctor(string) = ( 01 00 0C 21 49 4E 54 45 52 50 52 45 54 45 52 00 00 )   // ...!INTERPRETER.
-               // .custom instance void [TestDriver]CategoryAttribute::.ctor(string) = ( 01 00 08 21 42 49 54 43 4F 44 45 00 00 )          // ...!BITCODE..
+               .custom instance void [TestDriver]CategoryAttribute::.ctor(string) = ( 01 00 08 21 42 49 54 43 4F 44 45 00 00 )          // ...!BITCODE..
                .maxstack 16
                .locals init (
                        int32 res
@@ -2522,7 +2522,6 @@ END:
 
        .method public static int32 test_3_leave_multiple_blocks_from_hole ()
        {
-               .custom instance void [TestDriver]CategoryAttribute::.ctor(string) = ( 01 00 0C 21 49 4E 54 45 52 50 52 45 54 45 52 00 00 )   // ...!INTERPRETER.
                .locals init (int32 V_0)
 
                .try {
index fbb797436d389450e6aa4cc91b85c3425ce0662d..280ffc938ca64b9b70ea86c0a2aa1c9be5f8819c 100644 (file)
@@ -4054,8 +4054,7 @@ array_constructed:
                                                        goto handle_finally;
                                                }
                                        } else {
-                                               /* FIXME: handle filter clauses */
-                                               g_assert (0);
+                                               g_error ("FIXME: handle filter clause");
                                        }
                                }
                        }
index 5e2876cd869f292db1de39cd72f16e4acd1d8105..83e86c88d4e784c952affade19d7c80364ff051a 100644 (file)
@@ -936,12 +936,11 @@ generate (MonoMethod *method, RuntimeMethod *rtm, unsigned char *is_bb_start, Mo
                td.stack_height [c->handler_offset] = 0;
                td.vt_stack_size [c->handler_offset] = 0;
                td.is_bb_start [c->handler_offset] = 1;
-               if (c->flags == MONO_EXCEPTION_CLAUSE_NONE) {
-                       td.stack_height [c->handler_offset] = 1;
-                       td.stack_state [c->handler_offset] = g_malloc0(sizeof(StackInfo));
-                       td.stack_state [c->handler_offset][0].type = STACK_TYPE_O;
-                       td.stack_state [c->handler_offset][0].klass = NULL; /*FIX*/
-               }
+
+               td.stack_height [c->handler_offset] = 1;
+               td.stack_state [c->handler_offset] = g_malloc0(sizeof(StackInfo));
+               td.stack_state [c->handler_offset][0].type = STACK_TYPE_O;
+               td.stack_state [c->handler_offset][0].klass = NULL; /*FIX*/
        }
 
        td.ip = header->code;