Examples of VmInstanceMethod


Examples of org.jnode.vm.classmgr.VmInstanceMethod

        if (mts.isStatic()) {
            throw new IncompatibleClassChangeError(
                "Static method in invokevirtual");
        }

        final VmInstanceMethod method = (VmInstanceMethod) mts;
        final VmType<?> declClass = method.getDeclaringClass();
        if (declClass.isMagicType()) {
            magicHelper.emitMagic(eContext, method, false, this, currentMethod);
        } else {
            // TODO: port to ORP style (http://orp.sourceforge.net/)
            vstack.push(eContext);

            dropParameters(mts, true);

            if (method.isFinal() || method.isPrivate() || declClass.isFinal()) {
                // Do a fast invocation
                counters.getCounter("virtual-final").inc();

                // Call the methods native code from the statics table
                helper.invokeJavaMethod(method);
                // Result is already on the stack.
            } else {
                // Do a virtual method table invocation
                counters.getCounter("virtual-vmt").inc();

                final int tibIndex = method.getTibOffset();
                final int argSlotCount = Signature.getArgSlotCount(typeSizeInfo, methodRef
                    .getSignature());

                final int slotSize = helper.SLOTSIZE;
                final int asize = helper.ADDRSIZE;
View Full Code Here

Examples of org.jnode.vm.classmgr.VmInstanceMethod

        if (mts.isStatic()) {
            throw new IncompatibleClassChangeError(
                "Static method in invokevirtual");
        }

        final VmInstanceMethod method = (VmInstanceMethod) mts;
        final VmType<?> declClass = method.getDeclaringClass();
        if (declClass.isMagicType()) {
            magicHelper.emitMagic(eContext, method, false, this, currentMethod);
        } else {
            // TODO: port to ORP style (http://orp.sourceforge.net/)
            vstack.push(eContext);

            dropParameters(mts, true);

            if (method.isFinal() || method.isPrivate() || declClass.isFinal()) {
                // Do a fast invocation
                if (countBytecode) {
                    counters.getCounter("invokevirtual-final").inc();
                }

                // Call the methods native code from the statics table
                helper.invokeJavaMethod(method);
                // Result is already on the stack.
            } else {
                // Do a virtual method table invocation
                if (countBytecode) {
                    counters.getCounter("invokevirtual-vmt").inc();
                }

                final int tibIndex = method.getTibOffset();
                final int argSlotCount = Signature.getArgSlotCount(typeSizeInfo, methodRef
                    .getSignature());

                final int slotSize = helper.SLOTSIZE;
                final int asize = helper.ADDRSIZE;
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.