Examples of StackException


Examples of org.jnode.vm.bytecode.StackException

    /**
     * Grow the stack capacity.
     */
    private void grow() {
        if (stack.length == maxSize) {
            throw new StackException("Stack full");
        } else {
            final Item[] tmp = new Item[Math.min(maxSize, stack.length * 2)];
            System.arraycopy(stack, 0, tmp, 0, stack.length);
            stack = tmp;
        }
View Full Code Here

Examples of org.jnode.vm.bytecode.StackException

     * @param item
     * @return
     */
    final boolean isTos(Item item) {
        if (tos <= 0) {
            throw new StackException("Stack is empty");
        }
        return (stack[tos - 1] == item);
    }
View Full Code Here

Examples of org.jnode.vm.bytecode.StackException

        if (stack[--tos] != item) {
            int i = tos - 1;
            while ((i >= 0) && (stack[i] != item))
                i--;

            throw new StackException("OperandStack[" + tos + "](" + item
                + ") is not the expected element (found at " + i + ", "
                + this + ')');
        }
        stack[tos] = null;
    }
View Full Code Here

Examples of org.jnode.vm.bytecode.StackException

     * @param fpuReg
     */
    static void fxch(X86Assembler os, FPUStack fpuStack,
                     FPU fpuReg) {
        if (fpuReg == X86Register.ST0) {
            throw new StackException("Cannot fxch ST0");
        }
        os.writeFXCH(fpuReg);
        fpuStack.fxch(fpuReg);
    }
View Full Code Here

Examples of org.jnode.vm.bytecode.StackException

    /**
     * Grow the stack capacity.
     */
    private final void grow() {
        if (stack.length == maxSize) {
            throw new StackException("Stack full");
        } else {
            final Item[] tmp = new Item[Math.min(maxSize, stack.length * 2)];
            System.arraycopy(stack, 0, tmp, 0, stack.length);
            stack = tmp;
        }
View Full Code Here

Examples of org.jnode.vm.bytecode.StackException

     * @param item
     * @return
     */
    final boolean isTos(Item item) {
        if (tos <= 0) {
            throw new StackException("Stack is empty");
        }
        return (stack[tos - 1] == item);
    }
View Full Code Here

Examples of org.jnode.vm.bytecode.StackException

        if (stack[--tos] != item) {
            int i = tos - 1;
            while ((i >= 0) && (stack[i] != item))
                i--;

            throw new StackException("OperandStack[" + tos + "](" + item
                + ") is not the expected element (found at " + i + ", "
                + this + ')');
        }
        stack[tos] = null;
    }
View Full Code Here

Examples of org.jnode.vm.bytecode.StackException

     * @param fpuReg
     */
    static final void fxch(X86Assembler os, FPUStack fpuStack,
                           FPU fpuReg) {
        if (fpuReg == X86Register.ST0) {
            throw new StackException("Cannot fxch ST0");
        }
        os.writeFXCH(fpuReg);
        fpuStack.fxch(fpuReg);
    }
View Full Code Here

Examples of org.jnode.vm.bytecode.StackException

        for (int i = 0; i < tos; i++) {
            if (stack[tos - (i + 1)] == item) {
                return REGS[i];
            }
        }
        throw new StackException("Item not found on FPU stack");
    }
View Full Code Here

Examples of org.jnode.vm.bytecode.StackException

        for (int i = 0; i < tos; i++) {
            if (stack[tos - (i + 1)] == item) {
                return REGS[i];
            }
        }
        throw new StackException("Item not found on FPU stack");
    }
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.