Examples of VmMethod


Examples of gnu.classpath.jdwp.VMMethod

    VMMethod[] methods = VMVirtualMachine.getAllClassMethods(clazz);
    os.writeInt (methods.length);
    for (int i = 0; i < methods.length; i++)
      {
        VMMethod method = methods[i];
        method.writeId(os);
        JdwpString.writeString(os, method.getName());
        JdwpString.writeString(os, method.getSignature());
        os.writeInt(method.getModifiers());
      }
  }
View Full Code Here

Examples of gnu.classpath.jdwp.VMMethod

  {
    ClassReferenceTypeId refId
      = (ClassReferenceTypeId) idMan.readReferenceTypeId(bb);
    Class clazz = refId.getType();

    VMMethod method = VMMethod.readId(clazz, bb);
    LineTable lt = method.getLineTable();
    lt.write(os);
  }
View Full Code Here

Examples of gnu.classpath.jdwp.VMMethod

  {
   ClassReferenceTypeId refId
     = (ClassReferenceTypeId) idMan.readReferenceTypeId(bb);
    Class clazz = refId.getType();

    VMMethod method = VMMethod.readId(clazz, bb);
    VariableTable vt = method.getVariableTable();
    vt.write(os);
  }
View Full Code Here

Examples of org.jnode.vm.classmgr.VmMethod

    public final void visit_invokeinterface(VmConstIMethodRef methodRef, int count) {
        vstack.push(eContext);

        // Resolve the method
        methodRef.resolve(loader);
        final VmMethod method = methodRef.getResolvedVmMethod();
        final int argSlotCount = count - 1;

        // remove parameters from vstack
        dropParameters(method, true);
        // Get objectref -> EAX
        os.writeMOV(helper.ADDRSIZE, helper.AAX, helper.SP, argSlotCount
            * helper.SLOTSIZE);
        // Write the actual invokeinterface
        if (os.isCode32()) {
            X86IMTCompiler32.emitInvokeInterface(os, method);
        } else {
            X86IMTCompiler64.emitInvokeInterface(os, method);
        }
        // Test the stack alignment
        stackFrame.writeStackAlignmentTest(getCurInstrLabel());
        // Write the push result
        helper.pushReturnValue(method.getSignature());
    }
View Full Code Here

Examples of org.jnode.vm.classmgr.VmMethod

        // Flush the stack before an invoke
        vstack.push(eContext);

        methodRef.resolve(loader);
        try {
            final VmMethod sm = methodRef.getResolvedVmMethod();

            dropParameters(sm, true);

            // Call the methods code from the statics table
            helper.invokeJavaMethod(sm);
View Full Code Here

Examples of org.jnode.vm.classmgr.VmMethod

     * @param methodRef
     * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_invokevirtual(org.jnode.vm.classmgr.VmConstMethodRef)
     */
    public final void visit_invokevirtual(VmConstMethodRef methodRef) {
        methodRef.resolve(loader);
        final VmMethod mts = methodRef.getResolvedVmMethod();

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

        final VmInstanceMethod method = (VmInstanceMethod) mts;
View Full Code Here

Examples of org.jnode.vm.classmgr.VmMethod

        vstack.push(eContext);

        // Resolve the method
        methodRef.resolve(loader);
        final VmMethod method = methodRef.getResolvedVmMethod();
        final int argSlotCount = count - 1;

        // remove parameters from vstack
        dropParameters(method, true);
        // Get objectref -> EAX
        os.writeMOV(helper.ADDRSIZE, helper.AAX, helper.SP, argSlotCount
            * helper.SLOTSIZE);
        // Write the actual invokeinterface
        if (os.isCode32()) {
            X86IMTCompiler32.emitInvokeInterface(os, method);
        } else {
            X86IMTCompiler64.emitInvokeInterface(os, method);
        }
        // Test the stack alignment
        stackFrame.writeStackAlignmentTest(getCurInstrLabel());
        // Write the push result
        helper.pushReturnValue(method.getSignature());
    }
View Full Code Here

Examples of org.jnode.vm.classmgr.VmMethod

        // Flush the stack before an invoke
        vstack.push(eContext);

        methodRef.resolve(loader);
        try {
            final VmMethod sm = methodRef.getResolvedVmMethod();

            dropParameters(sm, true);

            // Call the methods code from the statics table
            helper.invokeJavaMethod(sm);
View Full Code Here

Examples of org.jnode.vm.classmgr.VmMethod

        if (countBytecode) {
            counters.getCounter("invokevirtual").inc();
        }

        methodRef.resolve(loader);
        final VmMethod mts = methodRef.getResolvedVmMethod();

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

        final VmInstanceMethod method = (VmInstanceMethod) mts;
View Full Code Here

Examples of org.jnode.vm.classmgr.VmMethod

                LittleEndian.setInt32(code, ofs, (extraIndex - ofs) - 4);
                ofs += 4;

                // Create extra field
                for (int k = 0; k < arrLength; k++) {
                    final VmMethod method = (VmMethod) arr[k];

                    if (k + 1 == arrLength) {
                        // Last entry, jump directly
                        // JMP [statics+method_statics_index]
                        extraIndex = genJmpStaticsCodeOfs(code, extraIndex,
                            method.getSharedStaticsIndex());
                    } else {
                        // Non-last entry, compare and jump of select match

                        // CMP selectorReg, imm32_selector
                        code[extraIndex++] = (byte) 0x81;
                        code[extraIndex++] = (byte) 0xFA;
                        LittleEndian.setInt32(code, extraIndex, method
                            .getSelector());
                        extraIndex += 4;

                        // JNE labelAfterJump
                        code[extraIndex++] = (byte) 0x75;
                        code[extraIndex++] = (byte) 0x06;

                        // JMP [statics+method_statics_index]
                        extraIndex = genJmpStaticsCodeOfs(code, extraIndex,
                            method.getSharedStaticsIndex());
                    }
                }
            } else if (imt[i] != null) {
                // Simple route

                // JMP [STATICS+staticsOfs]
                final VmMethod method = (VmMethod) imt[i];
                ofs = genJmpStaticsCodeOfs(code, ofs, method.getSharedStaticsIndex());
            } else {
                // Empty IMT slot
                // INT ABSTRACT_METHOD
                code[ofs++] = (byte) 0xCD;
                code[ofs++] = (byte) X86CompilerConstants.ABSTRACT_METHOD_INTNO;
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.