Skip to content

Commit

Permalink
Tests pass now
Browse files Browse the repository at this point in the history
  • Loading branch information
keyboardDrummer committed Oct 22, 2024
1 parent 14934ec commit ca07b3f
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions Source/VCGeneration/Splits/IsolateAttributeOnJumpsHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,13 @@ public static (List<ManualSplit> Isolated, ManualSplit Remainder) GetParts(VCGen
.ToList();
} else {
newBlock.Cmds = oldBlock.Cmds;
// if (newBlock.TransferCmd is ReturnCmd) {
// newBlock.TransferCmd = gotoFromReturn?.Origin;
// }
if (newBlock.TransferCmd is ReturnCmd && gotoFromReturn != null) {
/*
I'm not sure why this is necessary.
Possibly two block are coalesced which deletes the goto with the GotoFromReturn
*/
newBlock.TransferCmd = gotoFromReturn.Origin;
}
}
});
results.Add(rewriter.CreateSplit(new JumpOrigin(originalJump), newBlocks));
Expand Down

0 comments on commit ca07b3f

Please sign in to comment.