@SuppressWarnings("deprecation") public void init(Iterable<Entrypoint> entrypoints) throws CancelException { super.init(); CGNode root = getFakeRootNode(); int programCounter = 0; for(Entrypoint e : entrypoints) { root.addTarget(e.makeSite(programCounter++), null); } newNodes.push(root); closure(); isInitialized = true; }
@SuppressWarnings("deprecation") public void init(Iterable<Entrypoint> entrypoints) throws CancelException { super.init(); CGNode root = getFakeRootNode(); int programCounter = 0; for(Entrypoint e : entrypoints) { root.addTarget(e.makeSite(programCounter++), null); } newNodes.push(root); closure(); isInitialized = true; }
/** * Add a call to this entrypoint from the fake root method * * @param m the Fake Root Method * @return the call instruction added, or null if the operation fails */ public SSAAbstractInvokeInstruction addCall(AbstractRootMethod m) { int paramValues[]; CallSiteReference site = makeSite(0); if (site == null) { return null; } paramValues = new int[getNumberOfParameters()]; for (int j = 0; j < paramValues.length; j++) { paramValues[j] = makeArgument(m, j); if (paramValues[j] == -1) { // there was a problem return null; } } return m.addInvocation(paramValues, site); }
/** * Add a call to this entrypoint from the fake root method * * @param m the Fake Root Method * @return the call instruction added, or null if the operation fails */ public SSAAbstractInvokeInstruction addCall(AbstractRootMethod m) { int paramValues[]; CallSiteReference site = makeSite(0); if (site == null) { return null; } paramValues = new int[getNumberOfParameters()]; for (int j = 0; j < paramValues.length; j++) { paramValues[j] = makeArgument(m, j); if (paramValues[j] == -1) { // there was a problem return null; } } return m.addInvocation(paramValues, site); }