/** * Constructor. * * @param target The target of this PhiStmt. * @param block The basic Block in which this PhiJoinStmt resides. */ public PhiJoinStmt(final VarExpr target, final Block block) { super(target); this.block = block; this.operands = new HashMap(); final Iterator preds = block.graph().preds(block).iterator(); while (preds.hasNext()) { final Block pred = (Block) preds.next(); final VarExpr operand = (VarExpr) target.clone(); operands.put(pred, operand); operand.setParent(this); operand.setDef(null); } }
/** Returns the number of operands that this PhiJoinStmt has. */ public int numOperands() { return block.graph().preds(block).size(); }
/** * Returns the predacessor nodes (in the CFG not dominator graph) of the block in which this * PhiJoinStmt occurs. */ public Collection preds() { return block.graph().preds(block); }