Package dk.brics.xact.analysis.flowgraph.statements

Examples of dk.brics.xact.analysis.flowgraph.statements.NopStm


          if (v.isGlobal()) {
            Statement join = global_use.get(v);
            if (join == null) {
              // make new join node
              Debug.println(6, true, "Making join node for " + v + " (used in " + s + ")");
              join = new NopStm(s.getOrigin());
              graph.addNode(join);
              global_use.put(v, join);
//              Statement ea = new EmptyStm(v, s.getOrigin()); // initialisation value for the global var
//              graph.addNode(ea);
//              graph.addEntry(ea);
View Full Code Here


      });
    }
    for (Statement s : new LinkedHashSet<Statement>(graph.getNodes())) {
      if (s instanceof Assignment) {
        if (var_alias.getData(((Assignment) s).getDest()).array) {
          NopStm nop = new NopStm(s.getOrigin());
          graph.addNode(nop);
          for (Edge<Statement,VariableFilter> e : graph.getInEdges(s)) {
            graph.addEdge(e.getFrom(), nop, e.getData());
          }
          for (Edge<Statement,VariableFilter> e : graph.getOutEdges(s)) {
View Full Code Here

        Statement methodentry, methodexit;
        Variable returnVar;
        Variable[] parameters = new Variable[m.getParameterCount()];
        if (m.isConcrete()) {
          // entry
          methodentry = new NopStm(origin, "method entry");
          graph.addNode(methodentry);
          // exit
          methodexit = new NopStm(origin, "method exit");
          graph.addNode(methodexit);
          // parameters
          for (int i=0; i<m.getParameterCount(); i++) {
            parameters[i] = new Variable(context.getNextVarID(), false);
          }
View Full Code Here

     */
    public void moveToIsolation() {
        if (branches.size() > 0)
            throw new IllegalStateException("Unclosed branch");
        //firstStatement = null;
        lastStatement = new NopStm(currentOrigin);
        graph.addNode(lastStatement);
    }
View Full Code Here

    public StatementPair finish() {
        if (branches.size() > 0) {
            throw new IllegalStateException("A local branch was not closed. Each startBranch must have a corresponding call to endBranch");
        }
        if (firstStatement == null) {
            addStatement(new NopStm(currentOrigin));
        }
        StatementPair pair = new StatementPair(firstStatement, lastStatement);
        firstStatement = null;
        lastStatement = null;
        return pair;
View Full Code Here

     * See {@link ControlFlowBuilder} for a description of the branching methods.
     */
    public void startBranch() {
        // if no statement has been created, add a Nop as the start of the branch
        if (firstStatement == null) {
            addStatement(new NopStm(currentOrigin));
        }
        Statement start = lastStatement;
        Statement end = new NopStm(currentOrigin);
        graph.addNode(end);
        branchWasUsed = false;
        branches.add(new Branching(start, end));
    }
View Full Code Here

     */
    public void addStatement(Statement s, VariableFilter filter) {
      graph.addNode(s);
      currentOrigin = s.getOrigin();
        if (firstStatement == null) {
            addStatement(new NopStm(currentOrigin));
        }
        graph.addEdge(lastStatement, s, filter);
        lastStatement = s;
    }
View Full Code Here

        graph.addEdge(lastStatement, s, filter);
        lastStatement = s;
    }
   
    public void addFilter(VariableFilter filter) {
      addStatement(new NopStm(currentOrigin), filter);
    }
View Full Code Here

      addStatement(new NopStm(currentOrigin), filter);
    }
   
    public void addEdgeTo(Statement s, VariableFilter filter) {
      if (firstStatement == null) {
        addStatement(new NopStm(currentOrigin));
      }
      graph.addEdge(lastStatement, s, filter);
    }
View Full Code Here

      }
      graph.addEdge(lastStatement, s, filter);
    }
    public void addEdgeFrom(Statement s, VariableFilter filter) {
      if (firstStatement == null) {
        addStatement(new NopStm(currentOrigin));
      }
      graph.addEdge(s, lastStatement, filter);
    }
View Full Code Here

TOP

Related Classes of dk.brics.xact.analysis.flowgraph.statements.NopStm

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.