Package com.google.gwt.dev.jjs.impl.gflow.liveness.LivenessAssumption

Examples of com.google.gwt.dev.jjs.impl.gflow.liveness.LivenessAssumption.Updater


public class LivenessFlowFunction implements FlowFunction<CfgNode<?>, CfgEdge,
    Cfg, LivenessAssumption> {
  @Override
  public void interpret(CfgNode<?> node, Cfg g,
      AssumptionMap<CfgEdge, LivenessAssumption> assumptionMap) {
    final Updater result = new Updater(
        AssumptionUtil.join(g.getOutEdges(node), assumptionMap));

    node.accept(new CfgVisitor() {
      @Override
      public void visitReadNode(CfgReadNode node) {
        JVariable target = node.getTarget();
        if (target instanceof JLocal || target instanceof JParameter) {
          result.use(target);
        }
      }

      @Override
      public void visitReadWriteNode(CfgReadWriteNode node) {
        JVariable target = node.getTargetVariable();
        if (target instanceof JLocal || target instanceof JParameter) {
          result.use(target);
        }
      }

      @Override
      public void visitWriteNode(CfgWriteNode node) {
        JVariable target = node.getTargetVariable();
        if (target instanceof JLocal || target instanceof JParameter) {
          result.kill(target);
        }
      }
    });

    AssumptionUtil.setAssumptions(g.getInEdges(node), result.unwrap(), assumptionMap);
  }
View Full Code Here

TOP

Related Classes of com.google.gwt.dev.jjs.impl.gflow.liveness.LivenessAssumption.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.