/** * @throws IllegalArgumentException if method is null */ @SuppressWarnings("unchecked") public SSACFG(IMethod method, AbstractCFG cfg, SSAInstruction[] instructions) { if (method == null) { throw new IllegalArgumentException("method is null"); } this.delegate = cfg; if (DEBUG) { System.err.println(("Incoming CFG for " + method + ':')); System.err.println(cfg.toString()); } this.method = method; assert method.getDeclaringClass() != null : "null declaring class for " + method; createBasicBlocks(cfg); if (cfg instanceof InducedCFG) { addPhisFromInducedCFG((InducedCFG) cfg); addPisFromInducedCFG((InducedCFG) cfg); } if (cfg instanceof BytecodeCFG) { recordExceptionTypes(((BytecodeCFG) cfg).getExceptionHandlers(), method.getDeclaringClass().getClassLoader()); } this.instructions = instructions; }
/** * @throws IllegalArgumentException if method is null */ @SuppressWarnings("unchecked") public SSACFG(IMethod method, AbstractCFG cfg, SSAInstruction[] instructions) { if (method == null) { throw new IllegalArgumentException("method is null"); } this.delegate = cfg; if (DEBUG) { System.err.println(("Incoming CFG for " + method + ':')); System.err.println(cfg.toString()); } this.method = method; assert method.getDeclaringClass() != null : "null declaring class for " + method; createBasicBlocks(cfg); if (cfg instanceof InducedCFG) { addPhisFromInducedCFG((InducedCFG) cfg); addPisFromInducedCFG((InducedCFG) cfg); } if (cfg instanceof BytecodeCFG) { recordExceptionTypes(((BytecodeCFG) cfg).getExceptionHandlers(), method.getDeclaringClass().getClassLoader()); } this.instructions = instructions; }