Package org.jnode.vm.compiler

Examples of org.jnode.vm.compiler.NativeCodeCompiler


     * @param vmMethod The method to compile
     * @param optLevel The optimization level
     */
    private void doCompile(VmMethod vmMethod, int optLevel,
                           boolean enableTestCompilers) {
        final NativeCodeCompiler cmps[];
        int index;
        if (enableTestCompilers) {
            index = optLevel;
            optLevel += compilers.length;
            cmps = testCompilers;
        } else {
            index = optLevel;
            cmps = compilers;
        }

        final NativeCodeCompiler cmp;
        if (index < 0) {
            index = 0;
        } else if (index >= cmps.length) {
            index = cmps.length - 1;
        }
        if (vmMethod.getNativeCodeOptLevel() < optLevel) {
            cmp = cmps[index];
            cmp.compileRuntime(vmMethod, resolver, optLevel, null);
        }
    }
View Full Code Here


     * @see org.jnode.vm.classmgr.VmClassLoader#disassemble(org.jnode.vm.classmgr.VmMethod,
     * int, boolean, java.io.Writer)
     */
    public void disassemble(VmMethod vmMethod, int optLevel,
                            boolean enableTestCompilers, Writer writer) {
        final NativeCodeCompiler cmps[];
        int index;
        if (enableTestCompilers) {
            index = optLevel;
            optLevel += arch.getCompilers().length;
            cmps = arch.getTestCompilers();
        } else {
            index = optLevel;
            cmps = arch.getCompilers();
        }

        final NativeCodeCompiler cmp;
        if (index < 0) {
            index = 0;
        } else if (index >= cmps.length) {
            index = cmps.length - 1;
        }
        cmp = cmps[index];
        cmp.disassemble(vmMethod, getResolver(), optLevel, writer);
    }
View Full Code Here

    private final void compileClasses(NativeStream os, BaseVmArchitecture arch)
        throws ClassNotFoundException {
        final NativeCodeCompiler[] compilers = arch.getCompilers();
        final int optLevel = compilers.length - 1;
        // Use the most optimizing compiler here
        final NativeCodeCompiler compiler = compilers[optLevel];

        int oldCount;
        int newCount;
        boolean again;
        do {
View Full Code Here

            os.getObjectRef(proc);

            /* Let the compilers load its native symbol offsets */
            final NativeCodeCompiler[] cmps = arch.getCompilers();
            for (int i = 0; i < cmps.length; i++) {
                final NativeCodeCompiler cmp = cmps[i];
                cmp.initialize(clsMgr);
                os.getObjectRef(cmp);
            }
            /* Let the test compilers load its native symbol offsets */
            final NativeCodeCompiler[] testCmps = arch.getTestCompilers();
            if (testCmps != null) {
                for (int i = 0; i < testCmps.length; i++) {
                    final NativeCodeCompiler cmp = testCmps[i];
                    cmp.initialize(clsMgr);
                    os.getObjectRef(cmp);
                }
            }
            log("Compiling using " + cmps[0].getName() + " and "
                + cmps[cmps.length - 1].getName() + " compilers");
View Full Code Here

TOP

Related Classes of org.jnode.vm.compiler.NativeCodeCompiler

Copyright © 2018 www.massapicom. 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.