Package com.dragome.compiler.ast

Examples of com.dragome.compiler.ast.Block.removeChild()


    if (typeDecl.getClassName().equals("java.lang.String") && method.isInstanceConstructor())
    {

      Block body= method.getBody();

      body.removeChild(body.getFirstChild());

      MethodInvocation consume= (MethodInvocation) body.getLastChild();
      body.removeChild(consume);

      ReturnStatement r= new ReturnStatement(0, 0);
View Full Code Here


      Block body= method.getBody();

      body.removeChild(body.getFirstChild());

      MethodInvocation consume= (MethodInvocation) body.getLastChild();
      body.removeChild(consume);

      ReturnStatement r= new ReturnStatement(0, 0);
      r.setExpression((Expression) consume.getArguments().get(0));
      body.appendChild(r);
View Full Code Here

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

      b.removeChild(b.getFirstChild());

      b.removeChild(b.getLastChild());
      graph.rerootOutEdges(finallyNode, newNode, false);
      graph.removeInEdges(finallyNode);
      graph.removeNode(finallyNode);
View Full Code Here

    {
      Block b= finallyNode.block;

      b.removeChild(b.getFirstChild());

      b.removeChild(b.getLastChild());
      graph.rerootOutEdges(finallyNode, newNode, false);
      graph.removeInEdges(finallyNode);
      graph.removeNode(finallyNode);
    }
View Full Code Here

    decl.vbs.remove(vb2);
    VariableBinding vb= decl.vbs.get(0);
    vb.getParentBlock().replaceChild(p, vb);

    Block b= a1.getParentBlock();
    b.removeChild(a1);
    b.removeChild(a2);
    return true;
  }

  private boolean reduceYCrement(VariableDeclaration decl)
View Full Code Here

    VariableBinding vb= decl.vbs.get(0);
    vb.getParentBlock().replaceChild(p, vb);

    Block b= a1.getParentBlock();
    b.removeChild(a1);
    b.removeChild(a2);
    return true;
  }

  private boolean reduceYCrement(VariableDeclaration decl)
  {
View Full Code Here

    }

    vb.getParentBlock().replaceChild(replacement, vb);

    Block b= a1.getParentBlock();
    b.removeChild(a1);
    b.removeChild(a2);
    return true;
  }

  public void optimize()
View Full Code Here

    vb.getParentBlock().replaceChild(replacement, vb);

    Block b= a1.getParentBlock();
    b.removeChild(a1);
    b.removeChild(a2);
    return true;
  }

  public void optimize()
  {
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.