forgot some files

This commit is contained in:
Julian Dolby 2017-02-02 20:44:27 -05:00
parent d24519e974
commit b65517b958
2 changed files with 72 additions and 0 deletions

View File

@ -0,0 +1,34 @@
/*******************************************************************************
* Copyright (c) 2007 IBM Corporation.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
package com.ibm.wala.ipa.callgraph;
import com.ibm.wala.classLoader.IMethod;
import com.ibm.wala.ssa.AuxiliaryCache;
import com.ibm.wala.ssa.DefaultIRFactory;
import com.ibm.wala.ssa.IRFactory;
import com.ibm.wala.ssa.SSACache;
import com.ibm.wala.ssa.SSAOptions;
public class AnalysisCacheImpl extends AnalysisCache {
public AnalysisCacheImpl(IRFactory<IMethod> irFactory, SSAOptions ssaOptions) {
super(irFactory, ssaOptions, new SSACache(irFactory, new AuxiliaryCache(), new AuxiliaryCache()));
}
public AnalysisCacheImpl(IRFactory<IMethod> irFactory) {
this(irFactory, new AnalysisOptions().getSSAOptions());
}
public AnalysisCacheImpl() {
this(new DefaultIRFactory());
}
}

View File

@ -0,0 +1,38 @@
/*******************************************************************************
* Copyright (c) 2007 IBM Corporation.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
package com.ibm.wala.ipa.callgraph;
import com.ibm.wala.classLoader.IMethod;
import com.ibm.wala.ipa.callgraph.impl.Everywhere;
import com.ibm.wala.ssa.DefUse;
import com.ibm.wala.ssa.IR;
import com.ibm.wala.ssa.IRFactory;
import com.ibm.wala.ssa.SSAOptions;
public interface IAnalysisCacheView {
void invalidate(IMethod method, Context C);
IRFactory<IMethod> getIRFactory();
/**
* Find or create an IR for the method using the {@link Everywhere} context and default {@link SSAOptions}
*/
IR getIR(IMethod method);
/**
* Find or create a DefUse for the IR using the {@link Everywhere} context
*/
DefUse getDefUse(IR ir);
IR getIR(IMethod method, Context context);
}