Examples of IRBody


Examples of org.renjin.compiler.ir.tac.IRBody

    assertThat(cfg.getGraph().getSuccessors(bb.get(11)), itemsEqualTo(bb.get(12),bb.get(1)));
  }

  @Test
  public void dataframe() throws IOException {
   IRBody body = buildScope(Resources.toString(
       getClass().getResource("dataframe.test.R"), Charsets.UTF_8));
   ControlFlowGraph cfg = new ControlFlowGraph(body);
  }
View Full Code Here

Examples of org.renjin.compiler.ir.tac.IRBody

public class DominanceTreeTest extends CompilerTestCase {


  @Test
  public void immediateDominators() {
    IRBody block = buildScope("y<-1; if(q) y<-y+1 else y<-4; y");
    ControlFlowGraph cfg = new ControlFlowGraph(block);
   
    System.out.println(cfg);
   
    BasicBlock bb0 = cfg.getBasicBlocks().get(0); // y <- 1; if q goto BB1 else BB2
View Full Code Here

Examples of org.renjin.compiler.ir.tac.IRBody

    assertThat(domTree.getImmediateDominator(cfg.getExit()), equalTo(cfg.getEntry()));
  }
 
  @Test
  public void dominanceFrontier() throws IOException {
    IRBody block = parseCytron();
    ControlFlowGraph cfg = new ControlFlowGraph(block);
    List<BasicBlock> bb = cfg.getLiveBasicBlocks();
    DominanceTree dtree = new DominanceTree(cfg);

    // See Figure 9 in
View Full Code Here

Examples of org.renjin.compiler.ir.tac.IRBody

  }
 
  private void writeBody(MethodVisitor mv) {
    IRFunctionTable functionTable = new IRFunctionTable();
    IRBodyBuilder builder = new IRBodyBuilder(functionTable);
    IRBody body = builder.build(exp);
   
    ByteCodeVisitor visitor = new ByteCodeVisitor(generationContext, mv);
   
    ControlFlowGraph cfg = new ControlFlowGraph(body);
    for(BasicBlock bb : cfg.getBasicBlocks()) {
View Full Code Here

Examples of org.renjin.compiler.ir.tac.IRBody

    mv.visitMaxs(1, 1);
    mv.visitEnd();
}
  private void writeDoEvalBody(MethodVisitor mv) {
    IRBody body = thunk.getBody();

    generationContext.setContextLdc(0);
    generationContext.setEnvironmentLdc(1);
    ByteCodeVisitor visitor = new ByteCodeVisitor(generationContext, mv);
   
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.