[jit] Emit the seq point for filter clauses after the op_get_exc instruction.
authorZoltan Varga <vargaz@gmail.com>
Tue, 11 Aug 2015 00:55:32 +0000 (20:55 -0400)
committerZoltan Varga <vargaz@gmail.com>
Tue, 11 Aug 2015 00:55:32 +0000 (20:55 -0400)
mono/mini/method-to-ir.c

index cce832d9862e97069fc2c9267647ff3d78686703..f6c61beb71ba70cc84ec41d79a941a89d512f839 100644 (file)
@@ -7859,8 +7859,9 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                                MONO_INST_NEW (cfg, ins, OP_START_HANDLER);
                                MONO_ADD_INS (tblock, ins);
 
-                               if (seq_points && clause->flags != MONO_EXCEPTION_CLAUSE_FINALLY) {
+                               if (seq_points && clause->flags != MONO_EXCEPTION_CLAUSE_FINALLY && clause->flags != MONO_EXCEPTION_CLAUSE_FILTER) {
                                        /* finally clauses already have a seq point */
+                                       /* seq points for filter clauses are emitted below */
                                        NEW_SEQ_POINT (cfg, ins, clause->handler_offset, TRUE);
                                        MONO_ADD_INS (tblock, ins);
                                }
@@ -7902,6 +7903,11 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                                 */
                                EMIT_NEW_DUMMY_USE (cfg, dummy_use, tblock->in_stack [0]);
 #endif
+
+                               if (seq_points && clause->flags == MONO_EXCEPTION_CLAUSE_FILTER) {
+                                       NEW_SEQ_POINT (cfg, ins, clause->handler_offset, TRUE);
+                                       MONO_ADD_INS (tblock, ins);
+                               }
                                
                                if (clause->flags == MONO_EXCEPTION_CLAUSE_FILTER) {
                                        GET_BBLOCK (cfg, tblock, ip + clause->data.filter_offset);