Package org.jnode.vm.compiler

Examples of org.jnode.vm.compiler.EntryPoints


     */
    protected CompilerBytecodeVisitor createBytecodeVisitor(VmMethod method,
                                                            CompiledMethod cm, NativeStream os, int level,
                                                            boolean isBootstrap) {
        final InlineBytecodeVisitor cbv;
        final EntryPoints entryPoints = getEntryPoints();
        X86BytecodeVisitor byteCodeVisitor = byteCodeVisitorHolder.get();
        if (byteCodeVisitor == null) {
            byteCodeVisitor = new X86BytecodeVisitor(os, cm, isBootstrap, entryPoints, getMagicHelper(),
                getTypeSizeInfo());
        } else {
View Full Code Here


     */
    protected CompilerBytecodeVisitor createBytecodeVisitor(VmMethod method,
                                                            CompiledMethod cm, NativeStream os, int level,
                                                            boolean isBootstrap) {
        final InlineBytecodeVisitor cbv;
        final EntryPoints entryPoints = getEntryPoints();
        cbv = new X86BytecodeVisitor(os, cm, isBootstrap, entryPoints, magicHelper, getTypeSizeInfo());
        if (inlineMethods /*&& ((X86Assembler)os).isCode32()*/) {
            final VmClassLoader loader = method.getDeclaringClass().getLoader();
            return new OptimizingBytecodeVisitor(entryPoints, cbv, loader);
        } else {
View Full Code Here

        try {
            if (method.isNative()) {
                Object label = new Label(method.getMangledName());
                cm.setCodeStart(os.getObjectRef(label));
            } else {
                EntryPoints entryPoints = getEntryPoints();
                X86CompilerHelper helper = new X86CompilerHelper((X86Assembler) os, null, entryPoints, isBootstrap);
                helper.setMethod(method);
                X86StackFrame stackFrame = new X86StackFrame((X86Assembler) os, helper, method, entryPoints, cm);
                TypeSizeInfo typeSizeInfo = getTypeSizeInfo();
View Full Code Here

     *
     * @param loader the VmClassLoader
     */
    public final void initialize(VmClassLoader loader) {
        if (context == null) {
            context = new EntryPoints(loader, VmUtils.getVm().getHeapManager(), getMagic());
            mode = ((VmX86Architecture) loader.getArchitecture()).getMode();
            typeSizeInfo = loader.getArchitecture().getTypeSizeInfo();
        }
    }
View Full Code Here

        if (method.isNative()) {
            Object label = new Label(method.getMangledName());
            cm.setCodeStart(nos.getObjectRef(label));
        } else {
            final X86Assembler os = (X86Assembler) nos;
            final EntryPoints context = getEntryPoints();
            // Create the helper
            final X86CompilerHelper ih = new X86CompilerHelper(os, null, context, isBootstrap);
            // Start an "object"
            final NativeStream.ObjectInfo objectInfo = os.startObject(context.getVmMethodCodeClass());
            // Start the code creation
            cm.setCodeStart(os.setObjectRef(new Label(method.getMangledName() + "$$start")));

            // Setup call to {@link VmMethod#recompileMethod(int, int)}
            final VmType<?> declClass = method.getDeclaringClass();
            os.writePUSH(declClass.getSharedStaticsIndex());
            os.writePUSH(declClass.indexOf(method));
            final int recompileStatOfs = ih.getSharedStaticsOffset(context.getRecompileMethod());
            os.writeCALL(ih.STATICS, recompileStatOfs);

            // Emit jump to the newly compiled code.
            final int methodStatOfs = ih.getSharedStaticsOffset(method);
            os.writeJMP(ih.STATICS, methodStatOfs);
View Full Code Here

        }
        VmMethod method = arithMethod;
        VmByteCode code = method.getBytecode();
        //VmByteCode code = loadByteCode(className, "appel");

        EntryPoints context = new EntryPoints(loader, VmUtils.getVm().getHeapManager(), 1);
        X86CompilerHelper helper = new X86CompilerHelper(os, null, context, true);
        CompiledMethod cm = new CompiledMethod(1);
        TypeSizeInfo typeSizeInfo = loader.getArchitecture().getTypeSizeInfo();
        helper.setMethod(method);
        X86StackFrame stackFrame = new X86StackFrame(os, helper, method, context, cm);
View Full Code Here

TOP

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

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.