Package dk.brics.string.intermediate

Examples of dk.brics.string.intermediate.Variable


                for (Call c : s.getMethod().getCallSites()) {
                    link(((AssignmentNode) n).getArg(), c, c.args[i]);
                }
            }
            if (v == pa[i]) { // link formal to param alias
                Variable p = s.params[i];
                AssignmentNode an = (AssignmentNode) map.get(s).get(p);
                ((AssignmentNode) n).getArg().addDefUse(an);
            }
        }
    }
View Full Code Here


      ExceptionalReturn exReturn = call.target.getExceptionalReturn();
      for (int i=0; i<call.args.length; i++) {
        if (!beforeCall.mightBeAliases(v, call.args[i]))
          continue;
       
        Variable param = call.target.getEntry().params[i];
        ((AssignmentNode) n).getArg().addDefUse(map.get(exReturn).get(param));
      }
    }
  }
View Full Code Here

        if (!reference.getField().getDeclaringClass().isApplicationClass()) {
            return null;
        }

        VariableType type = factory.fromSootType(reference.getType());
        Variable var = factory.createVariable(type);
        Field field = factory.getField(reference.getField());
        factory.addStatement(new FieldReference(field, var));
       
        return var;
    }
View Full Code Here

  public Variable getNothing() {
    return nothingVar;
  }
 
  public Variable getLocal(Local local) {
    Variable var = locals.get(local);
    if (var == null) {
      var = application.createVariable(jt.fromSootType(local.getType()));
      locals.put(local, var);
    }
    return var;
View Full Code Here

    SootMethod sootMethod = expr.getMethod();
    Method method = factory.getMethod(sootMethod);
    if (method == null)
      return false;
   
    Variable var = factory.createVariable(VariableType.NONE);
    factory.addStatement(new Call(var, method, translateArguments(sootMethod, arguments, factory)));
   
    // the constructor of custom collection types must produce corrupt collections
    if (callee.getType() != VariableType.NONE) {
      factory.addStatement(new ObjectCorrupt(callee));
View Full Code Here

      IntermediateFactory factory) {
    Method method = factory.getMethod(target);
    if (method == null)
      return null;
   
    Variable result = factory.createVariable(factory.fromSootType(target.getReturnType()));
   
    factory.addStatement(new Call(result, method, translateArguments(target, arguments, factory)));
   
    return result;
  }
View Full Code Here

    SootMethod sootMethod = expr.getMethod();
    Method method = factory.getMethod(sootMethod);
    if (method == null)
      return null;
   
    Variable result = factory.createVariable(factory.fromSootType(sootMethod.getReturnType()));
    factory.addStatement(new Call(result, method, translateArguments(sootMethod, arguments, factory)));
   
    return result;
  }
View Full Code Here

        for (Resolver resolver : resolvers) {
            FieldResolution resolution = resolver.resolveField(reference);
            if (resolution == null)
                continue;
           
            Variable result = factory.createVariable(VariableType.STRING);
            factory.addStatement(new StringInit(result, resolution.getAutomaton()));
            return result;
        }
        return null;
    }
View Full Code Here

      addStatement(new StringInit(to, Automatons.getNull()));
      break;
     
    case STRINGBUFFER:
      // make a string buffer with the empty language of possible strings
      Variable temp = makeVariable(VariableType.STRING);
      addStatement(new StringBufferInit(to, temp));
      break;
     
    case ARRAY:
      // make an array with the empty language of possible strings, by not writing any strings to it
View Full Code Here

      addStatement(new ObjectCorrupt(var));
    }
  }
 
  private Variable makeAnyStringVariable() {
    Variable v = makeVariable(VariableType.STRING);
    addStatement(new StringInit(v, Basic.makeAnyString()));
    return v;
  }
View Full Code Here

TOP

Related Classes of dk.brics.string.intermediate.Variable

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.