Esempio n. 1
0
 protected ReferenceVariable arrayElementOfImpl(ReferenceVariable base) {
   VarNode l;
   if (base instanceof VarNode) {
     l = (VarNode) base;
   } else {
     FieldRefNode b = (FieldRefNode) base;
     l = pag.makeGlobalVarNode(b, b.getType());
     pag.addEdge(b, l);
   }
   return pag.makeFieldRefNode(l, ArrayElement.v());
 }
Esempio n. 2
0
  protected void assignObjectToImpl(ReferenceVariable lhs, AbstractObject obj) {
    AllocNode objNode =
        pag.makeAllocNode(new Pair("AbstractObject", obj.getType()), obj.getType(), null);

    VarNode var;
    if (lhs instanceof FieldRefNode) {
      var = pag.makeGlobalVarNode(objNode, objNode.getType());
      pag.addEdge((Node) lhs, var);
    } else {
      var = (VarNode) lhs;
    }
    pag.addEdge(objNode, var);
  }
Esempio n. 3
0
 protected ReferenceVariable tempLocalVariableImpl(SootMethod method) {
   return pag.makeLocalVarNode(
       new Pair("TempVar", new Integer(++G.v().SparkNativeHelper_tempVar)),
       RefType.v("java.lang.Object"),
       method);
 }
Esempio n. 4
0
 protected ReferenceVariable tempVariableImpl() {
   return pag.makeGlobalVarNode(
       new Pair("TempVar", new Integer(++G.v().SparkNativeHelper_tempVar)),
       RefType.v("java.lang.Object"));
 }
Esempio n. 5
0
 protected ReferenceVariable tempFieldImpl(String fieldsig) {
   return pag.makeGlobalVarNode(new Pair("tempField", fieldsig), RefType.v("java.lang.Object"));
 }
Esempio n. 6
0
 protected ReferenceVariable staticFieldImpl(String className, String fieldName) {
   SootClass c = RefType.v(className).getSootClass();
   SootField f = c.getFieldByName(fieldName);
   return pag.makeGlobalVarNode(f, f.getType());
 }
Esempio n. 7
0
 protected ReferenceVariable newInstanceOfImpl(ReferenceVariable cls) {
   return pag.nodeFactory().caseNewInstance((VarNode) cls);
 }
Esempio n. 8
0
 protected void throwExceptionImpl(AbstractObject obj) {
   AllocNode objNode =
       pag.makeAllocNode(new Pair("AbstractObject", obj.getType()), obj.getType(), null);
   pag.addEdge(objNode, pag.nodeFactory().caseThrow());
 }
Esempio n. 9
0
 protected void assignImpl(ReferenceVariable lhs, ReferenceVariable rhs) {
   pag.addEdge((Node) rhs, (Node) lhs);
 }