Examples of basicBlockAt()


Examples of org.teavm.model.Program.basicBlockAt()

        Program program = new Program();
        BasicBlock block = program.createBasicBlock();
        block.getInstructions().add(new EmptyInstruction());

        program = inputOutput(program);
        block = program.basicBlockAt(0);

        assertThat(block.getInstructions().size(), is(1));
        assertThat(block.getInstructions().get(0), instanceOf(EmptyInstruction.class));
    }
View Full Code Here

Examples of org.teavm.model.Program.basicBlockAt()

        stringConsInsn.setReceiver(program.createVariable());
        stringConsInsn.setConstant("foo");
        block.getInstructions().add(stringConsInsn);

        program = inputOutput(program);
        block = program.basicBlockAt(0);

        assertThat(block.getInstructions().size(), is(7));
        assertThat(block.getInstructions().get(0), instanceOf(ClassConstantInstruction.class));
        assertThat(block.getInstructions().get(1), instanceOf(NullConstantInstruction.class));
        assertThat(block.getInstructions().get(2), instanceOf(IntegerConstantInstruction.class));
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.