Examples of TryHeaderNode


Examples of com.dragome.compiler.graph.TryHeaderNode

    return header instanceof TryHeaderNode;
  }

  void apply_()
  {
    TryHeaderNode head= (TryHeaderNode) header;
    catchNodes= head.getCatchNodes();

    for (Node catchNode : head.getCatchNodes())
    {
      graph.rerootOutEdges(catchNode, newNode, false);
      graph.removeInEdges(catchNode);
      graph.removeNode(catchNode);
    }

    tryBodyNode= head.getTryBody();
    graph.rerootOutEdges(tryBodyNode, newNode, false);
    graph.removeInEdges(tryBodyNode);
    graph.removeNode(tryBodyNode);

    finallyNode= head.getFinallyNode();
    if (finallyNode != null)
    {
      Block b= finallyNode.block;

      b.removeChild(b.getFirstChild());
View Full Code Here

Examples of com.dragome.compiler.graph.TryHeaderNode

  }

  void rollOut_(Block block)
  {
    TryHeaderNode head= (TryHeaderNode) header;

    TryStatement stmt= head.getTryStatement();
    block.appendChild(stmt);

    graph.rollOut(tryBodyNode, stmt.getTryBlock());

    if (finallyNode != null)
View Full Code Here

Examples of com.dragome.compiler.graph.TryHeaderNode

    }
  }

  private void makeTryFrame(TryStatement stmt)
  {
    TryHeaderNode header= stmt.header;

    Node tryNode= graph.getOrCreateNode(stmt.getBeginIndex());
    tryNode.stack= new ASTNodeStack();
    header.setTryBody(tryNode);

    CatchClause clause= (CatchClause) stmt.getCatchStatements().getFirstChild();
    while (clause != null)
    {
      // Push implicit exception.
      Node catchNode= graph.createNode(clause.getBeginIndex());
      // catchNode.type = NodeType.CATCH;
      catchNode.stack= new ASTNodeStack(new VariableBinding(clause.getException()));
      header.addCatchNode(catchNode);

      clause= (CatchClause) clause.getNextSibling();
    }
  }
View Full Code Here

Examples of com.dragome.compiler.graph.TryHeaderNode

        }
        finallyNode.jsrCallers.add(cNode);
        if (cNode.preds().size() == 1 && finallyNode.preds().size() == 0 && cNode.getPred() instanceof TryHeaderNode)
        {

          TryHeaderNode tryHeaderNode= (TryHeaderNode) cNode.getPred();

          tryHeaderNode.setFinallyNode(finallyNode);
        }

      }
      else if (stmt instanceof ConditionalBranch)
      {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.