changeset 2215:999f8086cc4f

More changes to make it compile and work on win64.
author Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
date Mon, 21 Feb 2011 20:44:57 +0100
parents 30fd69882184
children b966d9b66bf9
files src/share/vm/c1x/c1x_CodeInstaller.cpp src/share/vm/c1x/c1x_Compiler.cpp src/share/vm/c1x/c1x_JavaAccess.cpp src/share/vm/c1x/c1x_VMEntries.cpp src/share/vm/c1x/c1x_VmIds.cpp src/share/vm/c1x/c1x_VmIds.hpp src/share/vm/compiler/compileBroker.cpp
diffstat 7 files changed, 23 insertions(+), 23 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/c1x/c1x_CodeInstaller.cpp	Mon Feb 21 19:53:48 2011 +0100
+++ b/src/share/vm/c1x/c1x_CodeInstaller.cpp	Mon Feb 21 20:44:57 2011 +0100
@@ -56,13 +56,13 @@
   const int MapWordBits = 64;
   if (i < MapWordBits) {
     jlong low = CiBitMap::low(bit_map);
-    return (low & (1L << i)) != 0;
+    return (low & (1LL << i)) != 0;
   } else {
     jint extra_idx = (i - MapWordBits) / MapWordBits;
     arrayOop extra = (arrayOop) CiBitMap::extra(bit_map);
     assert(extra_idx >= 0 && extra_idx < extra->length(), "unexpected index");
     jlong word = ((jlong*) extra->base(T_LONG))[extra_idx];
-    return (word & (1L << (i % MapWordBits))) != 0;
+    return (word & (1LL << (i % MapWordBits))) != 0;
   }
 }
 
@@ -143,18 +143,17 @@
         return new ConstantOopWriteValue(NULL);
       } else {
         obj->print();
-        ShouldNotReachHere();
       }
     } else if (type == T_ADDRESS) {
       return new ConstantLongValue(prim);
     }
     tty->print("%i", type);
-    ShouldNotReachHere();
   } else {
     value->klass()->print();
     value->print();
-    ShouldNotReachHere();
   }
+  ShouldNotReachHere();
+  return NULL;
 }
 
 // constructor used to create a method
--- a/src/share/vm/c1x/c1x_Compiler.cpp	Mon Feb 21 19:53:48 2011 +0100
+++ b/src/share/vm/c1x/c1x_Compiler.cpp	Mon Feb 21 20:44:57 2011 +0100
@@ -68,7 +68,7 @@
     for (int i = 0; i < Arguments::num_c1x_args(); ++i) {
       const char* arg = Arguments::c1x_args_array()[i];
       Handle option = java_lang_String::create_from_str(arg, THREAD);
-      bool result = VMExits::setOption(option);
+      jboolean result = VMExits::setOption(option);
       if (!result) fatal("Invalid option for C1X!");
     }
   }
@@ -198,5 +198,6 @@
       fatal(err_msg("unexpected CiKind: %c", ch));
       break;
   }
+  return T_ILLEGAL;
 }
 
--- a/src/share/vm/c1x/c1x_JavaAccess.cpp	Mon Feb 21 19:53:48 2011 +0100
+++ b/src/share/vm/c1x/c1x_JavaAccess.cpp	Mon Feb 21 20:44:57 2011 +0100
@@ -29,8 +29,8 @@
 // It looks up the name and signature symbols without creating new ones, all the symbols of these classes need to be already loaded.
 
 static void compute_offset(int &dest_offset, klassOop klass_oop, const char* name, const char* signature, bool static_field) {
-  Symbol* name_symbol = SymbolTable::probe(name, strlen(name));
-  Symbol* signature_symbol = SymbolTable::probe(signature, strlen(signature));
+  Symbol* name_symbol = SymbolTable::probe(name, (int)strlen(name));
+  Symbol* signature_symbol = SymbolTable::probe(signature, (int)strlen(signature));
 #ifdef DEBUG
   if (name_symbol == NULL) {
     tty->print_cr("symbol with name %s was not found in symbol table (klass=%s)", name, klass_oop->klass_part()->name()->as_C_string());
--- a/src/share/vm/c1x/c1x_VMEntries.cpp	Mon Feb 21 19:53:48 2011 +0100
+++ b/src/share/vm/c1x/c1x_VMEntries.cpp	Mon Feb 21 20:44:57 2011 +0100
@@ -389,6 +389,7 @@
     return arrayKlass::cast(thisKlass)->is_subtype_of(otherKlass);
   } else {
     fatal("unexpected class type");
+    return false;
   }
 }
 
@@ -449,7 +450,7 @@
   BasicType type = C1XCompiler::kindToBasicType(CiKind::typeChar(kind));
   assert(type != T_OBJECT, "primitive type expecteds");
   ciKlass* klass = ciTypeArrayKlass::make(type);
-  return JNIHandles::make_local(THREAD, C1XCompiler::get_RiType(klass, KlassHandle(NULL, THREAD), THREAD));
+  return JNIHandles::make_local(THREAD, C1XCompiler::get_RiType(klass, KlassHandle(), THREAD));
 }
 
 // public RiType getType(Class<?> javaClass);
@@ -458,6 +459,7 @@
   oop javaClassOop = JNIHandles::resolve(javaClass);
   if (javaClassOop == NULL) {
     fatal("argument to VMEntries.getType must not be NULL");
+    return NULL;
   } else if (java_lang_Class::is_primitive(javaClassOop)) {
     BasicType basicType = java_lang_Class::primitive_type(javaClassOop);
     return JNIHandles::make_local(THREAD, VMExits::createRiTypePrimitive((int) basicType, THREAD));
--- a/src/share/vm/c1x/c1x_VmIds.cpp	Mon Feb 21 19:53:48 2011 +0100
+++ b/src/share/vm/c1x/c1x_VmIds.cpp	Mon Feb 21 20:44:57 2011 +0100
@@ -52,7 +52,7 @@
   return _stubs->append(stub) | STUB;
 }
 
-jlong VmIds::add(Handle obj, CompilerObjectType type) {
+jlong VmIds::add(Handle obj, jlong type) {
   assert(!obj.is_null(), "cannot add NULL handle");
   int idx = -1;
   for (int i = 0; i < _localHandles->length(); i++)
--- a/src/share/vm/c1x/c1x_VmIds.hpp	Mon Feb 21 19:53:48 2011 +0100
+++ b/src/share/vm/c1x/c1x_VmIds.hpp	Mon Feb 21 20:44:57 2011 +0100
@@ -33,16 +33,14 @@
   static oop getObject(jlong id);
 
 public:
-  // this enum needs to have the same values as the one in HotSpotProxy.java
-  enum CompilerObjectType {
-    STUB           = 0x100000000000000l,        // address
-    METHOD         = 0x200000000000000l,        // methodOop
-    CLASS          = 0x300000000000000l,        // klassOop
-    CONSTANT_POOL  = 0x500000000000000l,        // constantPoolOop
-    CONSTANT       = 0x600000000000000l,        // oop
-    TYPE_MASK      = 0xf00000000000000l,
-    DUMMY_CONSTANT = 0x6ffffffffffffffl
-  };
+  // these constants needs to have the same values as the one in HotSpotProxy.java
+  static const jlong STUB           = 0x100000000000000LL;        // address
+  static const jlong METHOD         = 0x200000000000000LL;        // methodOop
+  static const jlong CLASS          = 0x300000000000000LL;        // klassOop
+  static const jlong CONSTANT_POOL  = 0x500000000000000LL;        // constantPoolOop
+  static const jlong CONSTANT       = 0x600000000000000LL;        // oop
+  static const jlong TYPE_MASK      = 0xf00000000000000LL;
+  static const jlong DUMMY_CONSTANT = 0x6ffffffffffffffLL;
 
   // Initializes the VmIds for a compilation, by creating the arrays
   static void initializeObjects();
@@ -53,7 +51,7 @@
   static jlong addStub(address stub);
 
   // Adds an object, and returns the corresponding vmId (with the given type)
-  static jlong add(Handle obj, CompilerObjectType type);
+  static jlong add(Handle obj, jlong type);
 
   // Adds an object, and returns the corresponding vmId (the type of which is determined by the template parameter)
   template <typename T> static jlong add(T obj);
--- a/src/share/vm/compiler/compileBroker.cpp	Mon Feb 21 19:53:48 2011 +0100
+++ b/src/share/vm/compiler/compileBroker.cpp	Mon Feb 21 20:44:57 2011 +0100
@@ -600,8 +600,8 @@
     }
 
     {
-      ThreadToNativeFromVM trans(JavaThread::current());
-      usleep(1000);
+      //ThreadToNativeFromVM trans(JavaThread::current());
+      os::sleep(THREAD, 10, true);
     }
     ++z;
   }