changeset 1450:565f45cebac2

Merge
author Thomas Wuerthinger <wuerthinger@ssw.jku.at>
date Thu, 11 Nov 2010 14:16:50 +0100
parents 8cfe3537a0d3 (current diff) 9196a2b32950 (diff)
children 8c121f2190f8
files c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotMethodResolved.java c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotXirGenerator.java c1x4hotspotsrc/hotspot/java src/share/vm/c1x/c1x_CodeInstaller.cpp
diffstat 10 files changed, 35 insertions(+), 33 deletions(-) [+]
line wrap: on
line diff
--- a/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotMethodResolved.java	Thu Nov 11 14:09:37 2010 +0100
+++ b/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotMethodResolved.java	Thu Nov 11 14:16:50 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	Thu Nov 11 14:09:37 2010 +0100
+++ b/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotMethodUnresolved.java	Thu Nov 11 14:16:50 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	Thu Nov 11 14:09:37 2010 +0100
+++ b/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotRegisterConfig.java	Thu Nov 11 14:16:50 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	Thu Nov 11 14:09:37 2010 +0100
+++ b/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotXirGenerator.java	Thu Nov 11 14:16:50 2010 +0100
@@ -97,7 +97,7 @@
                 XirOperand temp = asm.createRegisterTemp("temp (r10)", CiKind.Word, AMD64.r10);
                 XirOperand cache = asm.createRegisterTemp("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.createRegisterTemp("receiver", 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	Thu Nov 11 14:09:37 2010 +0100
+++ b/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/server/CompilationServer.java	Thu Nov 11 14:16:50 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]);
                 }
--- a/c1x4hotspotsrc/hotspot/java	Thu Nov 11 14:09:37 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,6 +0,0 @@
-#!/bin/bash
-# Launcher for JRE7 modified to run the HotSpotX compiler
-
-test -n "$JRE7" || { echo "Need to set JRE7 environment variable to the base of a JRE 1.7"; exit 1; }
-exec $JRE7/bin/java "$@"
-
--- a/domake	Thu Nov 11 14:09:37 2010 +0100
+++ b/domake	Thu Nov 11 14:16:50 2010 +0100
@@ -7,6 +7,7 @@
 while [ -h "$me" ]; do
     me=`readlink -e "$me"`
 done
+hsx_home=$(cd `dirname $me`; pwd)
 
 grep '-client KNOWN' $JRE7/lib/amd64/jvm.cfg >/dev/null
 if [ $? -ne 0 ] ; then
@@ -17,7 +18,13 @@
     exit 1
 fi
 
-pushd $(dirname "$me")/make
+java_link="$hsx_home/c1x4hotspotsrc/hotspot/java"
+if [ ! -e $java_link ]; then
+    echo "Creating link: $java_link -> $JRE7/bin/java"
+    ln -s $JRE7/bin/java $java_link
+fi
+
+pushd $hsx_home/make
 ALT_BOOTDIR=/usr/lib/jvm/java-6-openjdk/ LANG=C ARCH_DATA_MODEL=64 HOTSPOT_BUILD_JOBS=2 make jvmg1
 echo "Copying binaries to JRE7 directory $JRE7"
 cp ../build/linux/linux_amd64_compiler1/jvmg/libjvm.so $JRE7/lib/amd64/client
--- a/src/share/vm/c1x/c1x_CodeInstaller.cpp	Thu Nov 11 14:09:37 2010 +0100
+++ b/src/share/vm/c1x/c1x_CodeInstaller.cpp	Thu Nov 11 14:16:50 2010 +0100
@@ -304,18 +304,14 @@
 
 }
 
-void CodeInstaller::record_scope(jint pc_offset, oop code_pos, oop frame) {
+void CodeInstaller::record_scope(jint pc_offset, oop code_pos) {
   oop caller_pos = CiCodePos::caller(code_pos);
   if (caller_pos != NULL) {
-    oop caller_frame = frame == NULL ? NULL : CiDebugInfo_Frame::caller(frame);
-    record_scope(pc_offset, caller_pos, caller_frame);
-  } else {
-    assert(frame == NULL || CiDebugInfo_Frame::caller(frame) == NULL, "unexpected layout - mismatching nesting of Frame and CiCodePos");
+    record_scope(pc_offset, caller_pos);
   }
-
-  if (frame != NULL) {
-    assert(CiCodePos::bci(code_pos) == CiCodePos::bci(CiDebugInfo_Frame::codePos(frame)), "unexpected CiCodePos layout");
-    assert(CiCodePos::method(code_pos) == CiCodePos::method(CiDebugInfo_Frame::codePos(frame)), "unexpected CiCodePos layout");
+  oop frame = NULL;
+  if (code_pos->klass()->klass_part()->name() == vmSymbols::com_sun_cri_ci_CiDebugInfo_Frame()) {
+    frame = code_pos;
   }
 
   oop hotspot_method = CiCodePos::method(code_pos);
@@ -377,8 +373,7 @@
   _debug_recorder->add_safepoint(pc_offset, create_oop_map(_frame_size, _parameter_count, debug_info));
 
   oop code_pos = CiDebugInfo::codePos(debug_info);
-  oop frame = CiDebugInfo::frame(debug_info);
-  record_scope(pc_offset, code_pos, frame);
+  record_scope(pc_offset, code_pos);
 
   _debug_recorder->end_safepoint(pc_offset);
 }
@@ -401,8 +396,7 @@
   if (debug_info != NULL) {
     _debug_recorder->add_safepoint(next_pc_offset, create_oop_map(_frame_size, _parameter_count, debug_info));
     oop code_pos = CiDebugInfo::codePos(debug_info);
-    oop frame = CiDebugInfo::frame(debug_info);
-    record_scope(next_pc_offset, code_pos, frame);
+    record_scope(next_pc_offset, code_pos);
   }
 
   if (runtime_call != NULL) {
--- a/src/share/vm/c1x/c1x_CodeInstaller.hpp	Thu Nov 11 14:09:37 2010 +0100
+++ b/src/share/vm/c1x/c1x_CodeInstaller.hpp	Thu Nov 11 14:16:50 2010 +0100
@@ -94,7 +94,7 @@
   void site_DataPatch(CodeBuffer& buffer, jint pc_offset, oop site);
   void site_Mark(CodeBuffer& buffer, jint pc_offset, oop site);
 
-  void record_scope(jint pc_offset, oop code_pos, oop frame);
+  void record_scope(jint pc_offset, oop code_pos);
 
   void process_exception_handlers();
 
--- a/src/share/vm/c1x/c1x_TargetMethod.hpp	Thu Nov 11 14:09:37 2010 +0100
+++ b/src/share/vm/c1x/c1x_TargetMethod.hpp	Thu Nov 11 14:16:50 2010 +0100
@@ -112,13 +112,10 @@
   end_class                                                                             \
   start_class(CiDebugInfo)                                                              \
     oop_field(CiDebugInfo, codePos, "Lcom/sun/cri/ci/CiCodePos;")                       \
-    oop_field(CiDebugInfo, frame, "Lcom/sun/cri/ci/CiDebugInfo$Frame;")                 \
     oop_field(CiDebugInfo, registerRefMap, "[B")                                        \
     oop_field(CiDebugInfo, frameRefMap, "[B")                                           \
   end_class                                                                             \
   start_class(CiDebugInfo_Frame)                                                        \
-    oop_field(CiDebugInfo_Frame, caller, "Lcom/sun/cri/ci/CiDebugInfo$Frame;")          \
-    oop_field(CiDebugInfo_Frame, codePos, "Lcom/sun/cri/ci/CiCodePos;")                 \
     oop_field(CiDebugInfo_Frame, values, "[Lcom/sun/cri/ci/CiValue;")                   \
     int_field(CiDebugInfo_Frame, numLocals)                                             \
     int_field(CiDebugInfo_Frame, numStack)                                              \