changeset 1448:9196a2b32950

Modified C++ to reflect changes in calling convention CRI code.
author Doug Simon <doug.simon@oracle.com>
date Tue, 09 Nov 2010 17:40:15 +0100
parents 1afbc44ee576
children 565f45cebac2 43a93774d24f
files c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotMethodResolved.java c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotMethodUnresolved.java c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotRegisterConfig.java c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotXirGenerator.java c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/server/CompilationServer.java
diffstat 5 files changed, 19 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotMethodResolved.java	Tue Nov 09 17:38:40 2010 +0100
+++ b/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotMethodResolved.java	Tue Nov 09 17:40:15 2010 +0100
@@ -22,6 +22,7 @@
 
 import java.lang.reflect.*;
 
+import com.sun.cri.ci.*;
 import com.sun.cri.ri.*;
 
 /**
@@ -156,6 +157,11 @@
     }
 
     @Override
+    public StackTraceElement toStackTraceElement(int bci) {
+        return CiUtil.toStackTraceElement(this, bci);
+    }
+
+    @Override
     public RiSignature signature() {
         if (signature == null) {
             signature = new HotSpotSignature(Compiler.getVMEntries().RiMethod_signature(vmId));
--- a/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotMethodUnresolved.java	Tue Nov 09 17:38:40 2010 +0100
+++ b/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotMethodUnresolved.java	Tue Nov 09 17:40:15 2010 +0100
@@ -120,6 +120,11 @@
     }
 
     @Override
+    public StackTraceElement toStackTraceElement(int bci) {
+        return CiUtil.toStackTraceElement(this, bci);
+    }
+
+    @Override
     public boolean canBeStaticallyBound() {
         throw unresolved("canBeStaticallyBound");
     }
--- a/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotRegisterConfig.java	Tue Nov 09 17:38:40 2010 +0100
+++ b/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotRegisterConfig.java	Tue Nov 09 17:40:15 2010 +0100
@@ -96,18 +96,18 @@
     }
 
     @Override
-    public CiCallingConvention getCallingConvention(Type type, CiKind[] parameters, boolean outgoing, CiTarget target) {
-        if (type == Type.Native) {
+    public CiCallingConvention getCallingConvention(Type type, CiKind[] parameters, CiTarget target) {
+        if (type == Type.NativeCall) {
             throw new UnsupportedOperationException();
         }
-        return callingConvention(parameters, type == Type.Runtime ? true : outgoing, target);
+        return callingConvention(parameters, type, target);
     }
 
     public CiRegister[] getCallingConventionRegisters(Type type) {
         return allParameterRegisters;
     }
 
-    private CiCallingConvention callingConvention(CiKind[] types, boolean outgoing, CiTarget target) {
+    private CiCallingConvention callingConvention(CiKind[] types, Type type, CiTarget target) {
         CiValue[] locations = new CiValue[types.length];
 
         int currentGeneral = 0;
@@ -144,7 +144,7 @@
 
             if (locations[i] == null) {
                 // we need to adjust for the frame pointer stored on the stack, which shifts incoming arguments by one slot
-                locations[i] = CiStackSlot.get(kind.stackKind(), currentStackIndex + (outgoing ? 0 : 1), !outgoing);
+                locations[i] = CiStackSlot.get(kind.stackKind(), currentStackIndex + (type.out ? 0 : 1), !type.out);
                 currentStackIndex += target.spillSlots(kind);
             }
         }
--- a/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotXirGenerator.java	Tue Nov 09 17:38:40 2010 +0100
+++ b/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotXirGenerator.java	Tue Nov 09 17:40:15 2010 +0100
@@ -96,7 +96,7 @@
                 XirOperand temp = asm.createRegister("temp (r10)", CiKind.Word, AMD64.r10);
                 XirOperand cache = asm.createRegister("cache (rax)", CiKind.Word, AMD64.rax);
 
-                CiCallingConvention conventions = registerConfig.getCallingConvention(Java, new CiKind[] {CiKind.Object}, false, target);
+                CiCallingConvention conventions = registerConfig.getCallingConvention(JavaCallee, new CiKind[] {CiKind.Object}, target);
                 XirOperand receiver = asm.createRegister("cache (rax)", CiKind.Word, conventions.locations[0].asRegister());
 
                 asm.pload(CiKind.Word, temp, receiver, asm.i(config.hubOffset), false);
--- a/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/server/CompilationServer.java	Tue Nov 09 17:38:40 2010 +0100
+++ b/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/server/CompilationServer.java	Tue Nov 09 17:40:15 2010 +0100
@@ -28,7 +28,6 @@
 import javax.net.*;
 
 import com.sun.cri.ci.*;
-import com.sun.cri.ci.CiDebugInfo.Frame;
 import com.sun.cri.ri.*;
 import com.sun.hotspot.c1x.*;
 import com.sun.hotspot.c1x.Compiler;
@@ -80,7 +79,7 @@
                 return new Container(clazz, o.kind, o.boxedValue());
             } else if (clazz == CiDebugInfo.class) {
                 CiDebugInfo o = (CiDebugInfo) obj;
-                return new Container(clazz, o.codePos, o.frame, o.registerRefMap, o.frameRefMap);
+                return new Container(clazz, o.codePos, o.registerRefMap, o.frameRefMap);
             } else if (clazz == CiCodePos.class) {
                 CiCodePos o = (CiCodePos) obj;
                 return new Container(clazz, o.caller, o.method, o.bci);
@@ -106,7 +105,7 @@
                 if (c.clazz == CiConstant.class) {
                     return CiConstant.forBoxed((CiKind) c.values[0], c.values[1]);
                 } else if (c.clazz == CiDebugInfo.class) {
-                    return new CiDebugInfo((CiCodePos) c.values[0], (Frame) c.values[1], (byte[]) c.values[2], (byte[]) c.values[3]);
+                    return new CiDebugInfo((CiCodePos) c.values[0], (byte[]) c.values[2], (byte[]) c.values[3]);
                 } else if (c.clazz == CiCodePos.class) {
                     return new CiCodePos((CiCodePos) c.values[0], (RiMethod) c.values[1], (Integer) c.values[2]);
                 }