Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
IRScope.buildCFG(): Return CFG if it has already been built
  • Loading branch information
subbuss committed Feb 18, 2015
1 parent b4787ab commit f3c4b71
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions core/src/main/java/org/jruby/ir/IRScope.java
Expand Up @@ -441,6 +441,10 @@ public boolean canReceiveNonlocalReturns() {
}

public CFG buildCFG() {
if (getCFG() != null) {
return getCFG();
}

CFG newCFG = new CFG(this);
newCFG.build(getInstrs());
// Clear out instruction list after CFG has been built.
Expand Down

0 comments on commit f3c4b71

Please sign in to comment.