view c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotMethod.java @ 1421:6223633ce7dd

changed VMExit/VMEntries to non-static, added eclipse c++ project, CIR interface changes
author Lukas Stadler <lukas.stadler@oracle.com>
date Fri, 23 Jul 2010 15:53:02 -0700
parents 44efca8a02d6
children 3483ec571caf
line wrap: on
line source

package com.sun.hotspot.c1x;

import com.sun.cri.ri.RiExceptionHandler;
import com.sun.cri.ri.RiMethod;
import com.sun.cri.ri.RiMethodProfile;
import com.sun.cri.ri.RiSignature;
import com.sun.cri.ri.RiType;

public class HotSpotMethod implements RiMethod {

    Object methodOop;
    private byte[] code;

    public HotSpotMethod(Object methodOop) {
        this.methodOop = methodOop;
    }

    @Override
    public int accessFlags() {
        return Compiler.getVMEntries().RiMethod_accessFlags(methodOop);
    }

    @Override
    public boolean canBeStaticallyBound() {
        // TODO Auto-generated method stub
        return false;
    }

    @Override
    public byte[] code() {
        if (code == null) {
            code = Compiler.getVMEntries().RiMethod_code(methodOop);
        }

        return code;
    }

    @Override
    public RiExceptionHandler[] exceptionHandlers() {
        // TODO: Add support for exception handlers
        return new RiExceptionHandler[0];
    }

    @Override
    public boolean hasBalancedMonitors() {
        // TODO Auto-generated method stub
        return false;
    }

    @Override
    public RiType holder() {
        return Compiler.getVMEntries().RiMethod_holder(methodOop);
    }

    @Override
    public boolean isClassInitializer() {
        // TODO Auto-generated method stub
        return false;
    }

    @Override
    public boolean isConstructor() {
        // TODO Auto-generated method stub
        return false;
    }

    @Override
    public boolean isLeafMethod() {
        // TODO Auto-generated method stub
        return false;
    }

    @Override
    public boolean isOverridden() {
        // TODO Auto-generated method stub
        return false;
    }

    @Override
    public boolean isResolved() {
        // TODO Auto-generated method stub
        return false;
    }

    @Override
    public String jniSymbol() {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public Object liveness(int bci) {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public int maxLocals() {
        return Compiler.getVMEntries().RiMethod_maxLocals(methodOop);
    }

    @Override
    public int maxStackSize() {
        return Compiler.getVMEntries().RiMethod_maxStackSize(methodOop);
    }

    @Override
    public RiMethodProfile methodData() {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public String name() {
        return Compiler.getVMEntries().RiMethod_name(methodOop);
    }

    @Override
    public RiSignature signature() {
        return new HotSpotSignature(Compiler.getVMEntries().RiMethod_signature(methodOop));
    }

}