Mercurial > hg > truffle
comparison graal/com.oracle.truffle.dsl.processor/src/com/oracle/truffle/dsl/processor/generator/NodeGenFactory.java @ 19303:37bbcabf7744
Truffle-DSL: move constant guard assertions after dynamic guards.
author | Christian Humer <christian.humer@gmail.com> |
---|---|
date | Wed, 11 Feb 2015 19:28:59 +0100 |
parents | 8e4f683e16d9 |
children | ef292a5bb79d |
comparison
equal
deleted
inserted
replaced
19302:45a24e9ba03b | 19303:37bbcabf7744 |
---|---|
1621 ifCount++; | 1621 ifCount++; |
1622 } | 1622 } |
1623 if (!cast.isEmpty()) { | 1623 if (!cast.isEmpty()) { |
1624 builder.tree(cast); | 1624 builder.tree(cast); |
1625 } | 1625 } |
1626 if (!guardAssertions.isEmpty()) { | |
1627 builder.tree(guardAssertions); | |
1628 } | |
1629 boolean elseIf = !elseGuardExpressions.isEmpty(); | 1626 boolean elseIf = !elseGuardExpressions.isEmpty(); |
1630 if (!methodGuards.isEmpty()) { | 1627 if (!methodGuards.isEmpty()) { |
1631 builder.startIf(elseIf); | 1628 builder.startIf(elseIf); |
1632 builder.tree(methodGuards).end(); | 1629 builder.tree(methodGuards).end(); |
1633 builder.startBlock(); | 1630 builder.startBlock(); |
1634 ifCount++; | 1631 ifCount++; |
1635 } else if (elseIf) { | 1632 } else if (elseIf) { |
1636 builder.startElseBlock(); | 1633 builder.startElseBlock(); |
1637 ifCount++; | 1634 ifCount++; |
1635 } | |
1636 if (!guardAssertions.isEmpty()) { | |
1637 builder.tree(guardAssertions); | |
1638 } | 1638 } |
1639 | 1639 |
1640 boolean reachable = isReachableGroup(group, ifCount); | 1640 boolean reachable = isReachableGroup(group, ifCount); |
1641 if (reachable) { | 1641 if (reachable) { |
1642 for (SpecializationGroup child : group.getChildren()) { | 1642 for (SpecializationGroup child : group.getChildren()) { |