Package com.google.gwt.dev.jjs.impl.gflow.constants.ConstantsAssumption

Examples of com.google.gwt.dev.jjs.impl.gflow.constants.ConstantsAssumption.Updater


    final int outSize = graph.getOutEdges(node).size();
    final ArrayList<ConstantsAssumption> result =
      new ArrayList<ConstantsAssumption>(outSize);

    final Updater assumption = new Updater(in);
    node.accept(new CfgVisitor() {
      @Override
      public void visitConditionalNode(CfgConditionalNode<?> x) {
        JExpression condition = x.getCondition();

        Updater thenAssumptions = assumption.copy();
        Updater elseAssumptions = assumption.copy();

        Preconditions.checkNotNull(condition, "Null condition in %s", x);
        AssumptionDeducer.deduceAssumption(condition, JBooleanLiteral.TRUE,
            thenAssumptions);
        AssumptionDeducer.deduceAssumption(condition, JBooleanLiteral.FALSE,
            elseAssumptions);

        for (CfgEdge e : graph.getOutEdges(x)) {
          if (CfgConditionalNode.THEN.equals(e.getRole())) {
            result.add(thenAssumptions.unwrap());
          } else if (CfgConditionalNode.ELSE.equals(e.getRole())) {
            result.add(elseAssumptions.unwrap());
          } else {
            result.add(assumption.unwrap());
          }
        }
      }
View Full Code Here


    JMethod mainMethod = findMainMethod(program);
    JBlock block = ((JMethodBody) mainMethod.getBody()).getBlock();
    List<JStatement> statements = block.getStatements();
    JIfStatement ifStatement = (JIfStatement) statements.get(statements.size() - 1);

    Updater assumptions = new Updater(ConstantsAssumption.TOP);
    AssumptionDeducer.deduceAssumption(ifStatement.getIfExpr(),
        JBooleanLiteral.get(b), assumptions);
    return new Result(assumptions.unwrap());
  }
View Full Code Here

TOP

Related Classes of com.google.gwt.dev.jjs.impl.gflow.constants.ConstantsAssumption.Updater

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.