Examples of VmByteCode


Examples of org.jnode.vm.classmgr.VmByteCode

            if (methodName.equals(method.getName())) {
                arithMethod = method;
                break;
            }
        }
        VmByteCode code = arithMethod.getBytecode();
        return code;
    }
View Full Code Here

Examples of org.jnode.vm.classmgr.VmByteCode

        }
        return null;
    }

    public void startMethod(VmMethod method) {
        final VmByteCode bc = method.getBytecode();
        byteCode = bc;
        final int length = bc.getLength();
        opcodeFlags = new byte[length];
        branchFlags = new byte[length];

        // The first instruction is always the start of a BB.
        this.currentBlock = startBB(0);
        currentBlock.setStackOffset(bc.getNoLocals());
        // The exception handler also start a basic block
        for (int i = 0; i < bc.getNoExceptionHandlers(); i++) {
            VmInterpretedExceptionHandler eh = bc.getExceptionHandler(i);
            IRBasicBlock tryBlock = startTryBlock(eh.getStartPC());
            IRBasicBlock endTryBlock = startTryBlockEnd(eh.getEndPC());
            IRBasicBlock catchBlock = startException(eh.getHandlerPC());
        }
    }
View Full Code Here

Examples of org.jnode.vm.classmgr.VmByteCode

            IRBasicBlock catchBlock = startException(eh.getHandlerPC());
        }
    }

    public void endMethod() {
        VmByteCode bc = byteCode;
        // TODO add catch blocks to try successors
        for (int i = 0; i < bc.getNoExceptionHandlers(); i++) {
            VmInterpretedExceptionHandler eh = bc.getExceptionHandler(i);
        }
    }
View Full Code Here

Examples of org.jnode.vm.classmgr.VmByteCode

    private static void generateCode(X86Assembler os, String className)
        throws MalformedURLException, ClassNotFoundException {


        VmByteCode code = loadByteCode(className);

        X86CodeGenerator x86cg = null; //new X86CodeGenerator(os, code.getLength());

        IRControlFlowGraph cfg = new IRControlFlowGraph(code);
View Full Code Here

Examples of org.jnode.vm.classmgr.VmByteCode

            if ("const1".equals(method.getName())) {
                arithMethod = method;
                break;
            }
        }
        VmByteCode code = arithMethod.getBytecode();
        return code;
    }
View Full Code Here

Examples of org.jnode.vm.classmgr.VmByteCode

    public void setParser(BytecodeParser parser) {
    }

    public void startMethod(VmMethod method) {
        VmByteCode code = method.getBytecode();
        nArgs = method.getArgSlotCount();
        nLocals = code.getNoLocals();
        maxStack = code.getMaxStack();
        stackOffset = nLocals;
        variables = new Variable[nLocals + maxStack];
        int index = 0;
        for (int i = 0; i < nArgs; i += 1) {
            variables[index] = new MethodArgument<T>(Operand.UNKNOWN, index);
View Full Code Here

Examples of org.jnode.vm.classmgr.VmByteCode

    /**
     * @param method
     * @see BytecodeVisitor#startMethod(org.jnode.vm.classmgr.VmMethod)
     */
    public void startMethod(VmMethod method) {
        final VmByteCode bc = method.getBytecode();
        final int length = bc.getLength();
        opcodeFlags = new byte[length];
        // The first instruction is always the start of a BB.
        startBB(0, true);
        // The exception handler also start a basic block
        final TypeStack ehTStack = new TypeStack();
        ehTStack.push(JvmType.REFERENCE);
        for (int i = 0; i < bc.getNoExceptionHandlers(); i++) {
            VmInterpretedExceptionHandler eh = bc.getExceptionHandler(i);
            startTryBlock(eh.getStartPC());
            startTryBlockEnd(eh.getEndPC());
            startException(eh.getHandlerPC(), ehTStack);
        }
    }
View Full Code Here

Examples of org.jnode.vm.classmgr.VmByteCode

     * @param method
     * @see org.jnode.vm.bytecode.BytecodeVisitor#startMethod(org.jnode.vm.classmgr.VmMethod)
     */
    public void startMethod(VmMethod method) {
        this.method = method;
        final VmByteCode bc = method.getBytecode();
        final int length = bc.getLength();
        opcodeFlags = new byte[length];
        // The first instruction is always the start of a BB.
        startBB(0, true, tstack);
        // The exception handler also start a basic block
        final TypeStack ehTStack = new TypeStack();
        ehTStack.push(JvmType.REFERENCE);
        for (int i = 0; i < bc.getNoExceptionHandlers(); i++) {
            VmInterpretedExceptionHandler eh = bc.getExceptionHandler(i);
            startTryBlock(eh.getStartPC());
            startTryBlockEnd(eh.getEndPC());
            startException(eh.getHandlerPC(), ehTStack);
        }
    }
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.