if (!(closureArg instanceof WrappedIRClosure)) {
throw new RuntimeException("Encountered a dynamic closure arg. Cannot inline it here! Convert the yield to a call by converting the closure into a dummy method (have to convert all frame vars to call arguments, or at least convert the frame into a call arg");
}
Tuple t = (Tuple) yieldSites.get(0);
inlineClosureAtYieldSite(ii, ((WrappedIRClosure) closureArg).getClosure(), (BasicBlock) t.a, (YieldInstr) t.b);
}
// 9. Optimize cfg by merging straight-line bbs
cfg.collapseStraightLineBBs();