Package org.teavm.model.instructions

Examples of org.teavm.model.instructions.JumpInstruction


        } else {
            incoming.setSource(source);
        }
        if (!(incoming.getSource().getLastInstruction() instanceof JumpInstruction)) {
            final BasicBlock copyBlock = program.createBasicBlock();
            JumpInstruction jumpInstruction = new JumpInstruction();
            jumpInstruction.setTarget(phi.getBasicBlock());
            copyBlock.getInstructions().add(jumpInstruction);
            incoming.getSource().getLastInstruction().acceptVisitor(new BasicBlockMapper() {
                @Override protected BasicBlock map(BasicBlock block) {
                    if (block == phi.getBasicBlock()) {
                        return copyBlock;
View Full Code Here


        int lastNonEmpty = program.basicBlockCount() - 1;
        for (int i = program.basicBlockCount() - 2; i > 0; --i) {
            BasicBlock block = program.basicBlockAt(i);
            if (block.getPhis().isEmpty() && block.getInstructions().size() == 1 &&
                    block.getLastInstruction() instanceof JumpInstruction) {
                JumpInstruction insn = (JumpInstruction)block.getLastInstruction();
                if (insn.getTarget().getIndex() == i + 1) {
                    blockMapping[i] = lastNonEmpty;
                }
            }
            lastNonEmpty = blockMapping[i];
        }
View Full Code Here

TOP

Related Classes of org.teavm.model.instructions.JumpInstruction

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.