Skip to content

Commit f3c4b71

Browse files
committed
IRScope.buildCFG(): Return CFG if it has already been built
1 parent b4787ab commit f3c4b71

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

core/src/main/java/org/jruby/ir/IRScope.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -441,6 +441,10 @@ public boolean canReceiveNonlocalReturns() {
441441
}
442442

443443
public CFG buildCFG() {
444+
if (getCFG() != null) {
445+
return getCFG();
446+
}
447+
444448
CFG newCFG = new CFG(this);
445449
newCFG.build(getInstrs());
446450
// Clear out instruction list after CFG has been built.

0 commit comments

Comments
 (0)