Skip to content

Commit

Permalink
Don't build CFG for closures eagerly -- let it get built on demand.
Browse files Browse the repository at this point in the history
  • Loading branch information
subbuss committed Feb 19, 2015
1 parent 2238abf commit 65aec3e
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions core/src/main/java/org/jruby/ir/representations/CFG.java
Expand Up @@ -318,13 +318,6 @@ public DirectedGraph<BasicBlock> build(List<Instr> instrs) {
} else if (iop != Operation.LABEL) {
currBB.addInstr(i);
}

if (i instanceof CallBase) { // Build CFG for the closure if there exists one
Operand closureArg = ((CallBase) i).getClosureArg(getScope().getManager().getNil());
if (closureArg instanceof WrappedIRClosure) {
((WrappedIRClosure) closureArg).getClosure().buildCFG();
}
}
}

// Process all rescued regions
Expand Down

0 comments on commit 65aec3e

Please sign in to comment.