2008-07-22 Zoltan Varga <vargaz@gmail.com>
authorZoltan Varga <vargaz@gmail.com>
Wed, 23 Jul 2008 13:31:01 +0000 (13:31 -0000)
committerZoltan Varga <vargaz@gmail.com>
Wed, 23 Jul 2008 13:31:01 +0000 (13:31 -0000)
* mini.c (mono_bblock_insert_after_ins): Properly link up with the next
instruction in the ins==NULL case.

svn path=/trunk/mono/; revision=108550

mono/mini/ChangeLog
mono/mini/mini.c

index 908b12fcb3c6a0753e2e7c3d49412b6de4cae784..dbada8ad5ec8815d73c20246d250475a3af944f0 100644 (file)
@@ -1,3 +1,8 @@
+2008-07-22  Zoltan Varga  <vargaz@gmail.com>
+
+       * mini.c (mono_bblock_insert_after_ins): Properly link up with the next
+       instruction in the ins==NULL case.
+
 2008-07-23  Zoltan Varga  <vargaz@gmail.com>
 
        * mini-ops.h: Add OP_X86_OUTARG_ALIGN_STACK.
index d18a3f2f14169f9b4f8b8e47366a5a3dd68093c1..b729fedaa8a9408af9b396dd0203d1ec7db90ec3 100644 (file)
@@ -10880,7 +10880,12 @@ mono_bblock_insert_after_ins (MonoBasicBlock *bb, MonoInst *ins, MonoInst *ins_t
        if (ins == NULL) {
                ins = bb->code;
                bb->code = ins_to_insert;
+
+               /* Link with next */
                ins_to_insert->next = ins;
+               if (ins)
+                       ins->prev = ins_to_insert;
+
                if (bb->last_ins == NULL)
                        bb->last_ins = ins_to_insert;
        } else {