Skip unreachable code in SSA translation
This commit is contained in:
parent
cd036e26b7
commit
800e3117c9
1 changed files with 4 additions and 0 deletions
|
|
@ -130,6 +130,10 @@ public class SsaTranslation {
|
||||||
pushSpan(blockTree);
|
pushSpan(blockTree);
|
||||||
for (StatementTree statement : blockTree.statements()) {
|
for (StatementTree statement : blockTree.statements()) {
|
||||||
statement.accept(this, data);
|
statement.accept(this, data);
|
||||||
|
// skip everything after a return in a block
|
||||||
|
if (statement instanceof ReturnTree) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
popSpan();
|
popSpan();
|
||||||
return NOT_AN_EXPRESSION;
|
return NOT_AN_EXPRESSION;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue