works. splitting blocks by instructions jumped to and not checking

whether inlinable blocks were terminal.
This commit is contained in:
Adam
2015-06-20 18:39:40 -04:00
parent 713db7777f
commit 815b2e2931
2 changed files with 1 additions and 2 deletions

View File

@@ -106,7 +106,6 @@ public class Instructions
{
if (current == null || !i.from.isEmpty())
{
// this caused exception errors?
if (current != null)
{
current.end = current.instructions.get(current.instructions.size() - 1);

View File

@@ -34,7 +34,7 @@ public class Jumps
Block block = blocks.get(i);
Block prev = i > 0 ? blocks.get(i - 1) : null;
if (block.begin.from.size() == 1 && prev != null && prev.end.isTerminal())
if (block.begin.from.size() == 1 && block.end.isTerminal() && prev != null && prev.end.isTerminal())
{
// not sure if this is right, just don't mess with blocks in exception ranges or directly handling them
if (block.exceptions.isEmpty() == false || block.handlers.isEmpty() == false || prev.exceptions.isEmpty() == false || prev.handlers.isEmpty() == false)