# HG changeset patch # User Doug Simon # Date 1289320815 -3600 # Node ID 9196a2b329503fa0391fa07385d83030d47b715b # Parent 1afbc44ee576b619faa0270699274c8fc8eae1d2 Modified C++ to reflect changes in calling convention CRI code. diff -r 1afbc44ee576 -r 9196a2b32950 c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotMethodResolved.java --- 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)); diff -r 1afbc44ee576 -r 9196a2b32950 c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotMethodUnresolved.java --- 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"); } diff -r 1afbc44ee576 -r 9196a2b32950 c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotRegisterConfig.java --- 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); } } diff -r 1afbc44ee576 -r 9196a2b32950 c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotXirGenerator.java --- 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); diff -r 1afbc44ee576 -r 9196a2b32950 c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/server/CompilationServer.java --- 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]); }