Skip to content
Permalink
Browse files
Don't build CFG for closures eagerly -- let it get built on demand.
  • Loading branch information
subbuss committed Feb 19, 2015
1 parent 2238abf commit 65aec3e0f85804665297bb190a213b4057c511a1
Showing 1 changed file with 0 additions and 7 deletions.
@@ -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

0 comments on commit 65aec3e

Please sign in to comment.