Examples of VmCompiledCode


Examples of org.jnode.vm.classmgr.VmCompiledCode

            return cm;
        } else {
            // Set the address of the abstract method code
            final Address errorAddr = Unsafe
                .getJumpTableEntry(X86JumpTable.VM_INVOKE_ABSTRACT_IDX);
            final VmCompiledCode code = VmUtils.getVm().getCompiledMethods()
                .createCompiledCode(null, method, this, null,
                    errorAddr.toAddress(), null, 0, null, null, null);
            method.addCompiledCode(code, level);
            return null;
        }
View Full Code Here

Examples of org.jnode.vm.classmgr.VmCompiledCode

             * method.getBytecodeSize()); Screen.debug(method.getName());
             */
            // }
            final int count;
            final VmByteCode bc = method.getBytecode();
            final VmCompiledCode cc = reader.getCompiledCode(frame);
            if (bc != null) {
                count = bc.getNoExceptionHandlers();
            } else {
                count = 0;
            }
            // Screen.debug("eCount=" + count);
            for (int i = 0; i < count; i++) {
                final AbstractExceptionHandler eh;
                final VmCompiledExceptionHandler ceh;
                ceh = cc.getExceptionHandler(i);
                eh = ceh;
                boolean match;

                match = ceh.isInScope(address);

                if (match) {
                    final VmConstClass catchType = eh.getCatchType();

                    if (catchType == null) {
                        /* Catch all exceptions */
                        return Address.fromAddress(ceh.getHandler());
                    } else {
                        if (!catchType.isResolved()) {
                            SoftByteCodes.resolveClass(catchType);
                        }
                        final VmType handlerClass = catchType
                            .getResolvedVmClass();
                        if (handlerClass != null) {
                            if (handlerClass.isAssignableFrom(exClass)) {
                                return Address.fromAddress(ceh.getHandler());
                            }
                        } else {
                            System.err
                                .println("Warning: handler class==null in "
                                    + method.getName());
                        }
                    }
                }
            }

            if (cc.contains(address)) {
                return Address.fromAddress(cc.getDefaultExceptionHandler());
            } else {
                return null;
            }
        } catch (Throwable ex2) {
            Unsafe.debug("Exception in findThrowableHandler");
View Full Code Here

Examples of org.jnode.vm.classmgr.VmCompiledCode

    final VmMethod getMethod(Address sf) {
        final int ccid = sf.loadInt(getMethodIdOffset(sf));
        if (ccid == 0) {
            return null;
        } else {
            final VmCompiledCode cc = VmUtils.getVm().getCompiledMethods().get(ccid);
            if (cc == null) {
                // (This can happen if an exception is thrown while a frame
                // for a 'native' method call is on the stack.  A panic is not a
                // good idea.  It is better to generate a stack trace with a missing
                // method name.)
               
                // Unsafe.die("Unknown ccid found on stack");
                return null;
            } else {
                return cc.getMethod();
            }
        }
    }
View Full Code Here

Examples of org.jnode.vm.classmgr.VmCompiledCode

                }

                System.out.println("--------------------------------------------------------------------------");
                System.out.println("Stack frame:    " + NumberUtils.hex(stackFrame.toInt()));

                VmCompiledCode cc = VmUtils.getVm().getCompiledMethods().get(ccid);
                VmMethod vmMethod = cc.getMethod();
                int noArguments = vmMethod.getNoArguments();
                VmType[] args = new VmType[noArguments];
                for (int i = 0; i < noArguments; i++) {
                    args[i] = vmMethod.getArgumentType(i);
                }
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.