Examples of VmInterpretedExceptionHandler


Examples of org.jnode.vm.classmgr.VmInterpretedExceptionHandler

        //final int noLocals = bc.getNoLocals();
        //final int noLocalVars = noLocals - noArgs;
        final int count = bc.getNoExceptionHandlers();
        CompiledExceptionHandler[] ceh = new CompiledExceptionHandler[count];
        for (int i = 0; i < count; i++) {
            final VmInterpretedExceptionHandler eh = bc.getExceptionHandler(i);
            final Label handlerLabel = helper.genLabel("$$ex-handler" + i);

            final ObjectRef handlerRef = os.setObjectRef(handlerLabel);

            /** Clear the calculation stack (only locals are left) */
            if (noLocalVars < 0) {
                System.out.println("@#@#@#@# noLocalVars = " + noLocalVars);
            }
            final int ofs = Math.max(0, noLocalVars) * slotSize;
            os.writeLEA(asp, abp, -ofs);
            /** Push the exception in EAX */
            os.writePUSH(aax);
            /** Goto the real handler */
            os.writeJMP(helper.getInstrLabel(eh.getHandlerPC()));

            ceh[i] = new CompiledExceptionHandler();
            ceh[i].setStartPc(os.getObjectRef(helper.getInstrLabel(eh
                .getStartPC())));
            ceh[i].setEndPc(os
                .getObjectRef(helper.getInstrLabel(eh.getEndPC())));
            ceh[i].setHandler(handlerRef);

        }
        cm.setExceptionHandlers(ceh);

View Full Code Here

Examples of org.jnode.vm.classmgr.VmInterpretedExceptionHandler

        //final int noLocals = bc.getNoLocals();
        //final int noLocalVars = noLocals - noArgs;
        final int count = bc.getNoExceptionHandlers();
        CompiledExceptionHandler[] ceh = new CompiledExceptionHandler[count];
        for (int i = 0; i < count; i++) {
            final VmInterpretedExceptionHandler eh = bc.getExceptionHandler(i);
            final Label handlerLabel = helper.genLabel("$$ex-handler" + i);

            final ObjectRef handlerRef = os.setObjectRef(handlerLabel);

            /** Clear the calculation stack (only locals are left) */
            if (noLocalVars < 0) {
                System.out.println("@#@#@#@# noLocalVars = " + noLocalVars);
            }
            final int ofs = Math.max(0, noLocalVars) * slotSize;
            os.writeLEA(asp, abp, -ofs);
            /** Push the exception in EAX */
            os.writePUSH(aax);
            /** Goto the real handler */
            os.writeJMP(helper.getInstrLabel(eh.getHandlerPC()));

            ceh[i] = new CompiledExceptionHandler();
            ceh[i].setStartPc(os.getObjectRef(helper.getInstrLabel(eh
                .getStartPC())));
            ceh[i].setEndPc(os
                .getObjectRef(helper.getInstrLabel(eh.getEndPC())));
            ceh[i].setHandler(handlerRef);

        }
        cm.setExceptionHandlers(ceh);

View Full Code Here

Examples of org.jnode.vm.classmgr.VmInterpretedExceptionHandler

        //final int noLocals = bc.getNoLocals();
        //final int noLocalVars = noLocals - noArgs;
        final int count = bc.getNoExceptionHandlers();
        CompiledExceptionHandler[] ceh = new CompiledExceptionHandler[count];
        for (int i = 0; i < count; i++) {
            final VmInterpretedExceptionHandler eh = bc.getExceptionHandler(i);
            final Label handlerLabel = helper.genLabel("$$ex-handler" + i);

            final ObjectRef handlerRef = os.setObjectRef(handlerLabel);

            /** Clear the calculation stack (only locals are left) */
            if (noLocalVars < 0) {
                System.out.println("@#@#@#@# noLocalVars = " + noLocalVars);
            }
            final int ofs = Math.max(0, noLocalVars) * slotSize;
            os.writeLEA(asp, abp, -ofs);
            /** Push the exception in EAX */
            os.writePUSH(aax);
            /** Goto the real handler */
            os.writeJMP(helper.getInstrLabel(eh.getHandlerPC()));

            ceh[i] = new CompiledExceptionHandler();
            ceh[i].setStartPc(os.getObjectRef(helper.getInstrLabel(eh
                .getStartPC())));
            ceh[i].setEndPc(os
                .getObjectRef(helper.getInstrLabel(eh.getEndPC())));
            ceh[i].setHandler(handlerRef);

        }
        cm.setExceptionHandlers(ceh);

View Full Code Here

Examples of org.jnode.vm.classmgr.VmInterpretedExceptionHandler

        // 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.VmInterpretedExceptionHandler

    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.VmInterpretedExceptionHandler

        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.VmInterpretedExceptionHandler

        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.