public BasicBlock cloneForInlinedClosure(InlinerInfo ii) { // Update cfg for this bb IRScope hostScope = ii.getInlineHostScope(); BasicBlock clonedBB = ii.getOrCreateRenamedBB(this); // Process instructions for (Instr i: getInstrs()) { Instr clonedInstr = i.cloneForInlinedClosure(ii); if (clonedInstr != null) { clonedBB.addInstr(clonedInstr); if (clonedInstr instanceof CallBase) { CallBase call = (CallBase)clonedInstr; Operand block = call.getClosureArg(null); if (block instanceof WrappedIRClosure) hostScope.addClosure(((WrappedIRClosure)block).getClosure()); } } } return clonedBB; }
public BasicBlock cloneForInlinedClosure(InlinerInfo ii) { // Update cfg for this bb IRScope hostScope = ii.getInlineHostScope(); BasicBlock clonedBB = ii.getOrCreateRenamedBB(this); // Process instructions for (Instr i: getInstrs()) { Instr clonedInstr = i.cloneForInlinedClosure(ii); if (clonedInstr != null) { clonedBB.addInstr(clonedInstr); if (clonedInstr instanceof CallBase) { CallBase call = (CallBase)clonedInstr; Operand block = call.getClosureArg(null); if (block instanceof WrappedIRClosure) hostScope.addClosure(((WrappedIRClosure)block).getClosure()); } } } return clonedBB; }