From 6a1a7d0e75564c685970111c1e9b33d23f1eb80d Mon Sep 17 00:00:00 2001 From: sjfink Date: Fri, 20 Jul 2007 15:19:33 +0000 Subject: [PATCH] decouple IR caching from AnalysisOptions with a new AnalysisCache object git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@1514 f5eafffb-2e1d-0410-98e4-8ec43c5233c4 --- .../wala/cast/ipa/callgraph/AstCallGraph.java | 89 ++++++++--------- ...ntextInsensitiveSSAContextInterpreter.java | 5 +- .../AstSSAPropagationCallGraphBuilder.java | 95 +++++++++---------- .../ipa/callgraph/CrossLanguageCallGraph.java | 15 +-- ...anguageSSAPropagationCallGraphBuilder.java | 7 +- 5 files changed, 100 insertions(+), 111 deletions(-) diff --git a/com.ibm.wala.cast/source/java/com/ibm/wala/cast/ipa/callgraph/AstCallGraph.java b/com.ibm.wala.cast/source/java/com/ibm/wala/cast/ipa/callgraph/AstCallGraph.java index 1476b5141..1f36bf771 100644 --- a/com.ibm.wala.cast/source/java/com/ibm/wala/cast/ipa/callgraph/AstCallGraph.java +++ b/com.ibm.wala.cast/source/java/com/ibm/wala/cast/ipa/callgraph/AstCallGraph.java @@ -20,6 +20,7 @@ import com.ibm.wala.cfg.InducedCFG; import com.ibm.wala.classLoader.CallSiteReference; import com.ibm.wala.classLoader.IClass; import com.ibm.wala.classLoader.IMethod; +import com.ibm.wala.ipa.callgraph.AnalysisCache; import com.ibm.wala.ipa.callgraph.AnalysisOptions; import com.ibm.wala.ipa.callgraph.CGNode; import com.ibm.wala.ipa.callgraph.Context; @@ -35,25 +36,18 @@ import com.ibm.wala.util.Function; import com.ibm.wala.util.collections.HashSetFactory; public class AstCallGraph extends ExplicitCallGraph { - public AstCallGraph(IClassHierarchy cha, AnalysisOptions options) { - super(cha, options); + public AstCallGraph(IClassHierarchy cha, AnalysisOptions options, AnalysisCache cache) { + super(cha, options, cache); } public static class AstFakeRoot extends AbstractRootMethod { - public AstFakeRoot(MethodReference rootMethod, - IClass declaringClass, - IClassHierarchy cha, - AnalysisOptions options) - { - super(rootMethod, declaringClass, cha, options); + public AstFakeRoot(MethodReference rootMethod, IClass declaringClass, IClassHierarchy cha, AnalysisOptions options, AnalysisCache cache) { + super(rootMethod, declaringClass, cha, options, cache); } - public AstFakeRoot(MethodReference rootMethod, - IClassHierarchy cha, - AnalysisOptions options) - { - super(rootMethod, cha, options); + public AstFakeRoot(MethodReference rootMethod, IClassHierarchy cha, AnalysisOptions options, AnalysisCache cache) { + super(rootMethod, cha, options, cache); } public InducedCFG makeControlFlowGraph() { @@ -69,19 +63,12 @@ public class AstCallGraph extends ExplicitCallGraph { public static abstract class ScriptFakeRoot extends AstFakeRoot { - public ScriptFakeRoot(MethodReference rootMethod, - IClass declaringClass, - IClassHierarchy cha, - AnalysisOptions options) - { - super(rootMethod, declaringClass, cha, options); + public ScriptFakeRoot(MethodReference rootMethod, IClass declaringClass, IClassHierarchy cha, AnalysisOptions options, AnalysisCache cache) { + super(rootMethod, declaringClass, cha, options, cache); } - public ScriptFakeRoot(MethodReference rootMethod, - IClassHierarchy cha, - AnalysisOptions options) - { - super(rootMethod, cha, options); + public ScriptFakeRoot(MethodReference rootMethod, IClassHierarchy cha, AnalysisOptions options, AnalysisCache cache) { + super(rootMethod, cha, options, cache); } public abstract SSAAbstractInvokeInstruction addDirectCall(int functionVn, int[] argVns, CallSiteReference callSite); @@ -89,7 +76,7 @@ public class AstCallGraph extends ExplicitCallGraph { } protected class AstCGNode extends ExplicitNode { - private Set> callbacks; + private Set> callbacks; private AstCGNode(IMethod method, Context context) { super(method, context); @@ -100,7 +87,7 @@ public class AstCallGraph extends ExplicitCallGraph { boolean done = false; while (!done) { try { - for (Iterator> x = callbacks.iterator(); x.hasNext();) { + for (Iterator> x = callbacks.iterator(); x.hasNext();) { x.next().apply(null); } } catch (ConcurrentModificationException e) { @@ -112,48 +99,48 @@ public class AstCallGraph extends ExplicitCallGraph { } } - private boolean hasCallback(Function callback) { + private boolean hasCallback(Function callback) { return callbacks != null && callbacks.contains(callback); } - private boolean hasAllCallbacks(Set> callbacks) { + private boolean hasAllCallbacks(Set> callbacks) { return callbacks != null && callbacks.containsAll(callbacks); } - public void addCallback(Function callback) { - if (! hasCallback(callback)) { - if (callbacks == null) { - callbacks = HashSetFactory.make(1); - } + public void addCallback(Function callback) { + if (!hasCallback(callback)) { + if (callbacks == null) { + callbacks = HashSetFactory.make(1); + } - callbacks.add(callback); + callbacks.add(callback); - for(Iterator ps = getCallGraph().getPredNodes(this); ps.hasNext(); ) { - ((AstCGNode)ps.next()).addCallback(callback); - } + for (Iterator ps = getCallGraph().getPredNodes(this); ps.hasNext();) { + ((AstCGNode) ps.next()).addCallback(callback); + } } } - public void addAllCallbacks(Set> callback) { - if (! hasAllCallbacks(callbacks)) { - if (callbacks == null) { - callbacks = HashSetFactory.make(1); - } + public void addAllCallbacks(Set> callback) { + if (!hasAllCallbacks(callbacks)) { + if (callbacks == null) { + callbacks = HashSetFactory.make(1); + } - callbacks.addAll(callbacks); + callbacks.addAll(callbacks); - for(Iterator ps = getCallGraph().getPredNodes(this); ps.hasNext(); ) { - ((AstCGNode)ps.next()).addAllCallbacks(callbacks); - } + for (Iterator ps = getCallGraph().getPredNodes(this); ps.hasNext();) { + ((AstCGNode) ps.next()).addAllCallbacks(callbacks); + } } } public boolean addTarget(CallSiteReference site, CGNode node) { if (super.addTarget(site, node)) { - if (((AstCGNode)node).callbacks != null) { - ((AstCGNode)node).fireCallbacks(); - addAllCallbacks(((AstCGNode)node).callbacks); - } + if (((AstCGNode) node).callbacks != null) { + ((AstCGNode) node).fireCallbacks(); + addAllCallbacks(((AstCGNode) node).callbacks); + } return true; } else { return false; @@ -166,7 +153,7 @@ public class AstCallGraph extends ExplicitCallGraph { } protected CGNode makeFakeRootNode() { - return findOrCreateNode(new AstFakeRoot(FakeRootMethod.rootMethod, cha, options), Everywhere.EVERYWHERE); + return findOrCreateNode(new AstFakeRoot(FakeRootMethod.rootMethod, cha, options, getAnalysisCache()), Everywhere.EVERYWHERE); } } diff --git a/com.ibm.wala.cast/source/java/com/ibm/wala/cast/ipa/callgraph/AstContextInsensitiveSSAContextInterpreter.java b/com.ibm.wala.cast/source/java/com/ibm/wala/cast/ipa/callgraph/AstContextInsensitiveSSAContextInterpreter.java index 02785f2ea..5760d490e 100644 --- a/com.ibm.wala.cast/source/java/com/ibm/wala/cast/ipa/callgraph/AstContextInsensitiveSSAContextInterpreter.java +++ b/com.ibm.wala.cast/source/java/com/ibm/wala/cast/ipa/callgraph/AstContextInsensitiveSSAContextInterpreter.java @@ -16,6 +16,7 @@ import com.ibm.wala.cast.loader.AstMethod; import com.ibm.wala.classLoader.CallSiteReference; import com.ibm.wala.classLoader.IMethod; import com.ibm.wala.classLoader.NewSiteReference; +import com.ibm.wala.ipa.callgraph.AnalysisCache; import com.ibm.wala.ipa.callgraph.AnalysisOptions; import com.ibm.wala.ipa.callgraph.CGNode; import com.ibm.wala.ipa.callgraph.Context; @@ -27,8 +28,8 @@ public class AstContextInsensitiveSSAContextInterpreter extends ContextInsensitiveSSAInterpreter { - public AstContextInsensitiveSSAContextInterpreter(AnalysisOptions options) { - super(options); + public AstContextInsensitiveSSAContextInterpreter(AnalysisOptions options, AnalysisCache cache) { + super(options,cache); } public boolean understands(IMethod method, Context context) { diff --git a/com.ibm.wala.cast/source/java/com/ibm/wala/cast/ipa/callgraph/AstSSAPropagationCallGraphBuilder.java b/com.ibm.wala.cast/source/java/com/ibm/wala/cast/ipa/callgraph/AstSSAPropagationCallGraphBuilder.java index 85cdd73f1..6643c5933 100644 --- a/com.ibm.wala.cast/source/java/com/ibm/wala/cast/ipa/callgraph/AstSSAPropagationCallGraphBuilder.java +++ b/com.ibm.wala.cast/source/java/com/ibm/wala/cast/ipa/callgraph/AstSSAPropagationCallGraphBuilder.java @@ -40,6 +40,7 @@ import com.ibm.wala.fixedpoint.impl.AbstractOperator; import com.ibm.wala.fixedpoint.impl.UnaryOperator; import com.ibm.wala.fixpoint.IVariable; import com.ibm.wala.fixpoint.IntSetVariable; +import com.ibm.wala.ipa.callgraph.AnalysisCache; import com.ibm.wala.ipa.callgraph.AnalysisOptions; import com.ibm.wala.ipa.callgraph.CGNode; import com.ibm.wala.ipa.callgraph.CallGraph; @@ -87,31 +88,30 @@ public abstract class AstSSAPropagationCallGraphBuilder extends SSAPropagationCa public static final boolean DEBUG_PROPERTIES = false; - /////////////////////////////////////////////////////////////////////////// + // ///////////////////////////////////////////////////////////////////////// // // language specialization interface // - /////////////////////////////////////////////////////////////////////////// + // ///////////////////////////////////////////////////////////////////////// protected abstract boolean useObjectCatalog(); - /////////////////////////////////////////////////////////////////////////// + // ///////////////////////////////////////////////////////////////////////// // // overall control // - /////////////////////////////////////////////////////////////////////////// + // ///////////////////////////////////////////////////////////////////////// - protected AstSSAPropagationCallGraphBuilder(IClassHierarchy cha, AnalysisOptions options, - PointerKeyFactory pointerKeyFactory) { - super(cha, options, pointerKeyFactory); + protected AstSSAPropagationCallGraphBuilder(IClassHierarchy cha, AnalysisOptions options, AnalysisCache cache, PointerKeyFactory pointerKeyFactory) { + super(cha, options, cache, pointerKeyFactory); } public SSAContextInterpreter makeDefaultContextInterpreters(SSAContextInterpreter appContextInterpreter, AnalysisOptions options, IClassHierarchy cha, ReflectionSpecification reflect) { - SSAContextInterpreter c = new DefaultSSAInterpreter(options); - c = new DelegatingSSAContextInterpreter(new AstContextInsensitiveSSAContextInterpreter(options), c); + SSAContextInterpreter c = new DefaultSSAInterpreter(options, getAnalysisCache()); + c = new DelegatingSSAContextInterpreter(new AstContextInsensitiveSSAContextInterpreter(options, getAnalysisCache()), c); - c = new DelegatingSSAContextInterpreter(new FactoryBypassInterpreter(options, reflect), c); + c = new DelegatingSSAContextInterpreter(new FactoryBypassInterpreter(options, getAnalysisCache(), reflect), c); if (appContextInterpreter == null) return c; @@ -119,11 +119,11 @@ public abstract class AstSSAPropagationCallGraphBuilder extends SSAPropagationCa return new DelegatingSSAContextInterpreter(appContextInterpreter, c); } - /////////////////////////////////////////////////////////////////////////// + // ///////////////////////////////////////////////////////////////////////// // // specialized pointer analysis // - /////////////////////////////////////////////////////////////////////////// + // ///////////////////////////////////////////////////////////////////////// public static class AstPointerFlowGraph extends PointerFlowGraph { @@ -240,14 +240,14 @@ public abstract class AstSSAPropagationCallGraphBuilder extends SSAPropagationCa } }; - /////////////////////////////////////////////////////////////////////////// + // ///////////////////////////////////////////////////////////////////////// // // top-level node constraint generation // - /////////////////////////////////////////////////////////////////////////// + // ///////////////////////////////////////////////////////////////////////// protected ExplicitCallGraph createEmptyCallGraph(IClassHierarchy cha, AnalysisOptions options) { - return new AstCallGraph(cha, options); + return new AstCallGraph(cha, options, getAnalysisCache()); } public static class AstInterestingVisitor extends InterestingVisitor implements AstInstructionVisitor { @@ -299,32 +299,31 @@ public abstract class AstSSAPropagationCallGraphBuilder extends SSAPropagationCa public boolean hasNoInterestingUses(CGNode node, int vn, DefUse du) { if (node.getMethod() instanceof AstMethod) { - int uses[] = - ((AstMethod)node.getMethod()).lexicalInfo.getAllExposedUses(); - for(int i = 0; i < uses.length; i++) { - if (uses[i] == vn) { - return false; - } + int uses[] = ((AstMethod) node.getMethod()).lexicalInfo.getAllExposedUses(); + for (int i = 0; i < uses.length; i++) { + if (uses[i] == vn) { + return false; + } } } return super.hasNoInterestingUses(node, vn, du); } - /////////////////////////////////////////////////////////////////////////// + // ///////////////////////////////////////////////////////////////////////// // // IR visitor specialization for Ast-specific IR types // - /////////////////////////////////////////////////////////////////////////// + // ///////////////////////////////////////////////////////////////////////// protected ConstraintVisitor makeVisitor(ExplicitCallGraph.ExplicitNode node) { return new AstConstraintVisitor(this, node); } protected static class AstConstraintVisitor extends ConstraintVisitor implements AstInstructionVisitor { - + private final CallGraph cg; - + public AstConstraintVisitor(AstSSAPropagationCallGraphBuilder builder, ExplicitCallGraph.ExplicitNode node) { super(builder, node); this.cg = builder.callGraph; @@ -390,7 +389,7 @@ public abstract class AstSSAPropagationCallGraphBuilder extends SSAPropagationCa int lvn = ((LocalPointerKey) lexicalKey).getValueNumber(); IR lir = getBuilder().getCFAContextInterpreter().getIR(lnode); SymbolTable lsymtab = lir.getSymbolTable(); - DefUse ldu = getOptions().getSSACache().findOrCreateDU(lir, lnode.getContext()); + DefUse ldu = getAnalysisCache().getSSACache().findOrCreateDU(lir, lnode.getContext()); if (contentsAreInvariant(lsymtab, ldu, lvn)) { InstanceKey[] ik = getInvariantContents(lsymtab, ldu, lnode, lvn); system.recordImplicitPointsToSet(lexicalKey); @@ -549,11 +548,11 @@ public abstract class AstSSAPropagationCallGraphBuilder extends SSAPropagationCa } - /////////////////////////////////////////////////////////////////////////// + // ///////////////////////////////////////////////////////////////////////// // // lexical scoping handling // - /////////////////////////////////////////////////////////////////////////// + // ///////////////////////////////////////////////////////////////////////// private abstract class LexicalOperator extends UnaryOperator { private final AstCGNode node; @@ -590,7 +589,7 @@ public abstract class AstSSAPropagationCallGraphBuilder extends SSAPropagationCa CGNode from = (CGNode) caller; CGNode to = (CGNode) callee; - for (Iterator SS = cg.getPossibleSites(from,to); SS.hasNext();) { + for (Iterator SS = cg.getPossibleSites(from, to); SS.hasNext();) { CallSiteReference site = (CallSiteReference) SS.next(); PointerKey V = isLoad ? getLocalReadKey(from, site, name, definer, D) : getLocalWriteKey(from, site, name, @@ -676,7 +675,7 @@ public abstract class AstSSAPropagationCallGraphBuilder extends SSAPropagationCa IR ir = getBuilder().getCFAContextInterpreter().getIR(opNode); SymbolTable symtab = ir.getSymbolTable(); - DefUse du = getOptions().getSSACache().findOrCreateDU(ir, opNode.getContext()); + DefUse du = getAnalysisCache().getSSACache().findOrCreateDU(ir, opNode.getContext()); if (contentsAreInvariant(symtab, du, 1)) { system.recordImplicitPointsToSet(F); final InstanceKey[] functionKeys = getInvariantContents(symtab, du, opNode, 1); @@ -898,7 +897,7 @@ public abstract class AstSSAPropagationCallGraphBuilder extends SSAPropagationCa // now redo analysis // TODO: only values[i] uses need to be re-done. - getOptions().getSSACache().invalidateDU(M, n.getContext()); + getAnalysisCache().getSSACache().invalidateDU(M, n.getContext()); // addConstraintsFromChangedNode(n); getBuilder().markChanged(n); @@ -914,11 +913,11 @@ public abstract class AstSSAPropagationCallGraphBuilder extends SSAPropagationCa } } - /////////////////////////////////////////////////////////////////////////// + // ///////////////////////////////////////////////////////////////////////// // // property manipulation handling // - /////////////////////////////////////////////////////////////////////////// + // ///////////////////////////////////////////////////////////////////////// private interface ReflectedFieldAction { void action(AbstractFieldPointerKey fieldKey); @@ -926,7 +925,8 @@ public abstract class AstSSAPropagationCallGraphBuilder extends SSAPropagationCa void dump(AbstractFieldPointerKey fieldKey, boolean constObj, boolean constProp); } - private void newFieldOperation(CGNode opNode, final int objVn, final int fieldsVn, final boolean isLoadOperation, final ReflectedFieldAction action) { + private void newFieldOperation(CGNode opNode, final int objVn, final int fieldsVn, final boolean isLoadOperation, + final ReflectedFieldAction action) { IR ir = getBuilder().getCFAContextInterpreter().getIR(opNode); SymbolTable symtab = ir.getSymbolTable(); DefUse du = getBuilder().getCFAContextInterpreter().getDU(opNode); @@ -991,7 +991,7 @@ public abstract class AstSSAPropagationCallGraphBuilder extends SSAPropagationCa for (int f = 0; f < fieldsKeys.length; f++) { if (isLoadOperation) { for (Iterator keys = getPointerKeysForReflectedFieldRead(objKeys[o], fieldsKeys[f]); keys.hasNext();) { - AbstractFieldPointerKey key = (AbstractFieldPointerKey)keys.next(); + AbstractFieldPointerKey key = (AbstractFieldPointerKey) keys.next(); if (DEBUG_PROPERTIES) action.dump(key, true, true); action.action(key); @@ -999,7 +999,7 @@ public abstract class AstSSAPropagationCallGraphBuilder extends SSAPropagationCa } else { system.newConstraint(objCatalog, fieldsKeys[f]); for (Iterator keys = getPointerKeysForReflectedFieldWrite(objKeys[o], fieldsKeys[f]); keys.hasNext();) { - AbstractFieldPointerKey key = (AbstractFieldPointerKey)keys.next(); + AbstractFieldPointerKey key = (AbstractFieldPointerKey) keys.next(); if (DEBUG_PROPERTIES) action.dump(key, true, true); action.action(key); @@ -1075,9 +1075,8 @@ public abstract class AstSSAPropagationCallGraphBuilder extends SSAPropagationCa } } else { system.newConstraint(objCatalog, fieldsKeys[f]); - for (Iterator keys = getPointerKeysForReflectedFieldWrite(object, fieldsKeys[f]); keys - .hasNext();) { - AbstractFieldPointerKey key = (AbstractFieldPointerKey)keys.next(); + for (Iterator keys = getPointerKeysForReflectedFieldWrite(object, fieldsKeys[f]); keys.hasNext();) { + AbstractFieldPointerKey key = (AbstractFieldPointerKey) keys.next(); if (DEBUG_PROPERTIES) action.dump(key, true, false); action.action(key); @@ -1182,11 +1181,11 @@ public abstract class AstSSAPropagationCallGraphBuilder extends SSAPropagationCa } public void action(AbstractFieldPointerKey fieldKey) { - if (! representsNullType( fieldKey.getInstanceKey() )) { + if (!representsNullType(fieldKey.getInstanceKey())) { for (int i = 0; i < rhsFixedValues.length; i++) { system.findOrCreateIndexForInstanceKey(rhsFixedValues[i]); - system.newConstraint(fieldKey, rhsFixedValues[i]); - } + system.newConstraint(fieldKey, rhsFixedValues[i]); + } } } }); @@ -1205,9 +1204,9 @@ public abstract class AstSSAPropagationCallGraphBuilder extends SSAPropagationCa } public void action(AbstractFieldPointerKey fieldKey) { - if (! representsNullType( fieldKey.getInstanceKey() )) { - system.newConstraint(fieldKey, assignOperator, rhs); - } + if (!representsNullType(fieldKey.getInstanceKey())) { + system.newConstraint(fieldKey, assignOperator, rhs); + } } }); } @@ -1223,9 +1222,9 @@ public abstract class AstSSAPropagationCallGraphBuilder extends SSAPropagationCa } public void action(AbstractFieldPointerKey fieldKey) { - if (! representsNullType( fieldKey.getInstanceKey() )) { - system.newConstraint(lhs, assignOperator, fieldKey); - } + if (!representsNullType(fieldKey.getInstanceKey())) { + system.newConstraint(lhs, assignOperator, fieldKey); + } } }); } diff --git a/com.ibm.wala.cast/source/java/com/ibm/wala/cast/ipa/callgraph/CrossLanguageCallGraph.java b/com.ibm.wala.cast/source/java/com/ibm/wala/cast/ipa/callgraph/CrossLanguageCallGraph.java index d7e73d19f..a194e020a 100644 --- a/com.ibm.wala.cast/source/java/com/ibm/wala/cast/ipa/callgraph/CrossLanguageCallGraph.java +++ b/com.ibm.wala.cast/source/java/com/ibm/wala/cast/ipa/callgraph/CrossLanguageCallGraph.java @@ -19,6 +19,7 @@ import com.ibm.wala.cast.util.TargetLanguageSelector; import com.ibm.wala.classLoader.CallSiteReference; import com.ibm.wala.classLoader.IClass; import com.ibm.wala.classLoader.IMethod; +import com.ibm.wala.ipa.callgraph.AnalysisCache; import com.ibm.wala.ipa.callgraph.AnalysisOptions; import com.ibm.wala.ipa.callgraph.CGNode; import com.ibm.wala.ipa.callgraph.impl.AbstractRootMethod; @@ -47,8 +48,8 @@ import com.ibm.wala.util.collections.HashSetFactory; public class CrossLanguageCallGraph extends AstCallGraph { public CrossLanguageCallGraph(TargetLanguageSelector roots, IClassHierarchy cha, - AnalysisOptions options) { - super(cha, options); + AnalysisOptions options, AnalysisCache cache) { + super(cha, options, cache); this.roots = roots; } @@ -84,12 +85,12 @@ public class CrossLanguageCallGraph extends AstCallGraph { public class CrossLanguageFakeRoot extends ScriptFakeRoot { - public CrossLanguageFakeRoot(IClass declaringClass, IClassHierarchy cha, AnalysisOptions options) { - super(FakeRootMethod.rootMethod, declaringClass, cha, options); + public CrossLanguageFakeRoot(IClass declaringClass, IClassHierarchy cha, AnalysisOptions options, AnalysisCache cache) { + super(FakeRootMethod.rootMethod, declaringClass, cha, options, cache); } - public CrossLanguageFakeRoot(IClassHierarchy cha, AnalysisOptions options) { - super(FakeRootMethod.rootMethod, cha, options); + public CrossLanguageFakeRoot(IClassHierarchy cha, AnalysisOptions options, AnalysisCache cache) { + super(FakeRootMethod.rootMethod, cha, options, cache); } public int addPhi(TypeReference type, int[] values) { @@ -154,6 +155,6 @@ public class CrossLanguageCallGraph extends AstCallGraph { } protected CGNode makeFakeRootNode() { - return findOrCreateNode(new CrossLanguageFakeRoot(cha, options), Everywhere.EVERYWHERE); + return findOrCreateNode(new CrossLanguageFakeRoot(cha, options, getAnalysisCache()), Everywhere.EVERYWHERE); } } diff --git a/com.ibm.wala.cast/source/java/com/ibm/wala/cast/ipa/callgraph/CrossLanguageSSAPropagationCallGraphBuilder.java b/com.ibm.wala.cast/source/java/com/ibm/wala/cast/ipa/callgraph/CrossLanguageSSAPropagationCallGraphBuilder.java index cde8f00e7..cef6a5c24 100644 --- a/com.ibm.wala.cast/source/java/com/ibm/wala/cast/ipa/callgraph/CrossLanguageSSAPropagationCallGraphBuilder.java +++ b/com.ibm.wala.cast/source/java/com/ibm/wala/cast/ipa/callgraph/CrossLanguageSSAPropagationCallGraphBuilder.java @@ -4,6 +4,7 @@ import java.util.Iterator; import com.ibm.wala.cast.ipa.callgraph.AstSSAPropagationCallGraphBuilder.AstPointerAnalysisImpl.AstImplicitPointsToSetVisitor; import com.ibm.wala.cast.util.TargetLanguageSelector; +import com.ibm.wala.ipa.callgraph.AnalysisCache; import com.ibm.wala.ipa.callgraph.AnalysisOptions; import com.ibm.wala.ipa.callgraph.CGNode; import com.ibm.wala.ipa.callgraph.CallGraph; @@ -50,15 +51,15 @@ public abstract class CrossLanguageSSAPropagationCallGraphBuilder extends AstSSA protected abstract TargetLanguageSelector makeRootNodeSelector(); - protected CrossLanguageSSAPropagationCallGraphBuilder(IClassHierarchy cha, AnalysisOptions options, + protected CrossLanguageSSAPropagationCallGraphBuilder(IClassHierarchy cha, AnalysisOptions options, AnalysisCache cache, PointerKeyFactory pointerKeyFactory) { - super(cha, options, pointerKeyFactory); + super(cha, options, cache, pointerKeyFactory); visitors = makeMainVisitorSelector(); interesting = makeInterestingVisitorSelector(); } protected ExplicitCallGraph createEmptyCallGraph(IClassHierarchy cha, AnalysisOptions options) { - return new CrossLanguageCallGraph(makeRootNodeSelector(), cha, options); + return new CrossLanguageCallGraph(makeRootNodeSelector(), cha, options, getAnalysisCache()); } protected static Atom getLanguage(CGNode node) {