Ejemplo n.º 1
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);
  }
Ejemplo n.º 2
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());
 }
Ejemplo n.º 3
0
 protected void throwExceptionImpl(AbstractObject obj) {
   AllocNode objNode =
       pag.makeAllocNode(new Pair("AbstractObject", obj.getType()), obj.getType(), null);
   pag.addEdge(objNode, pag.nodeFactory().caseThrow());
 }
Ejemplo n.º 4
0
 protected void assignImpl(ReferenceVariable lhs, ReferenceVariable rhs) {
   pag.addEdge((Node) rhs, (Node) lhs);
 }