Ejemplo n.º 1
0
 public InstanceKey getInstanceKeyForMultiNewArray(
     CGNode node, NewSiteReference allocation, int dim) {
   if (allocationPolicy()) {
     return siteBased.getInstanceKeyForMultiNewArray(node, allocation, dim);
   } else {
     return classBased.getInstanceKeyForMultiNewArray(node, allocation, dim);
   }
 }
Ejemplo n.º 2
0
 public <T> InstanceKey getInstanceKeyForConstant(TypeReference type, T S) {
   if (type == null) {
     throw new IllegalArgumentException("null type");
   }
   if (disambiguateConstants() || isReflectiveType(type)) {
     return new ConstantKey<T>(S, getClassHierarchy().lookupClass(type));
   } else {
     return classBased.getInstanceKeyForConstant(type, S);
   }
 }
Ejemplo n.º 3
0
  public InstanceKey getInstanceKeyForAllocation(CGNode node, NewSiteReference allocation) {
    if (allocation == null) {
      throw new IllegalArgumentException("allocation is null");
    }
    TypeReference t = allocation.getDeclaredType();
    IClass C = cha.lookupClass(t);

    if (C != null && isInteresting(C)) {
      if (smushMany()) {
        if (exceedsSmushLimit(C, node)) {
          return smushed.getInstanceKeyForAllocation(node, allocation);
        } else {
          return siteBased.getInstanceKeyForAllocation(node, allocation);
        }
      } else {
        return siteBased.getInstanceKeyForAllocation(node, allocation);
      }
    } else {
      return classBased.getInstanceKeyForAllocation(node, allocation);
    }
  }
Ejemplo n.º 4
0
 public InstanceKey getInstanceKeyForClassObject(TypeReference type) {
   return classBased.getInstanceKeyForClassObject(type);
 }
Ejemplo n.º 5
0
 /*
  * @see com.ibm.wala.ipa.callgraph.propagation.InstanceKeyFactory#getInstanceKeyForPEI(com.ibm.wala.ipa.callgraph.CGNode,
  * com.ibm.wala.classLoader.ProgramCounter, com.ibm.wala.types.TypeReference)
  */
 public InstanceKey getInstanceKeyForPEI(CGNode node, ProgramCounter pei, TypeReference type) {
   return classBased.getInstanceKeyForPEI(node, pei, type);
 }