changeset 2282:0309d394eb5f

Added support for non-null oop values in scope objects (allocating global handle).
author Thomas Wuerthinger <thomas@wuerthinger.net>
date Mon, 04 Apr 2011 21:02:45 +0200
parents 0579225e0670
children f21664b3dd1c 569d3fe7d65c
files src/share/vm/c1x/c1x_CodeInstaller.cpp src/share/vm/c1x/c1x_JavaAccess.cpp src/share/vm/c1x/c1x_JavaAccess.hpp
diffstat 3 files changed, 7 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/c1x/c1x_CodeInstaller.cpp	Mon Apr 04 20:00:55 2011 +0200
+++ b/src/share/vm/c1x/c1x_CodeInstaller.cpp	Mon Apr 04 21:02:45 2011 +0200
@@ -142,7 +142,7 @@
       if (obj == NULL) {
         return new ConstantOopWriteValue(NULL);
       } else {
-        obj->print();
+        return new ConstantOopWriteValue(JNIHandles::make_global(obj));
       }
     } else if (type == T_ADDRESS) {
       return new ConstantLongValue(prim);
--- a/src/share/vm/c1x/c1x_JavaAccess.cpp	Mon Apr 04 20:00:55 2011 +0200
+++ b/src/share/vm/c1x/c1x_JavaAccess.cpp	Mon Apr 04 21:02:45 2011 +0200
@@ -52,7 +52,7 @@
 
 // This piece of macro magic creates the contents of the c1x_compute_offsets method that initializes the field indices of all the access classes.
 
-#define START_CLASS(name) { klassOop k = SystemDictionary::name##_klass();
+#define START_CLASS(name) { klassOop k = SystemDictionary::name##_klass(); assert(k != NULL, "Could not find class " #name "");
 
 #define END_CLASS }
 
--- a/src/share/vm/c1x/c1x_JavaAccess.hpp	Mon Apr 04 20:00:55 2011 +0200
+++ b/src/share/vm/c1x/c1x_JavaAccess.hpp	Mon Apr 04 21:02:45 2011 +0200
@@ -138,11 +138,11 @@
     long_field(CiBitMap, low)                                                           \
     oop_field(CiBitMap, extra, "[J")                                                    \
   end_class                                                                             \
-  start_class(CiFrame)                                                        \
-    oop_field(CiFrame, values, "[Lcom/sun/cri/ci/CiValue;")                   \
-    int_field(CiFrame, numLocals)                                             \
-    int_field(CiFrame, numStack)                                              \
-    int_field(CiFrame, numLocks)                                              \
+  start_class(CiFrame)                                                                  \
+    oop_field(CiFrame, values, "[Lcom/sun/cri/ci/CiValue;")                             \
+    int_field(CiFrame, numLocals)                                                       \
+    int_field(CiFrame, numStack)                                                        \
+    int_field(CiFrame, numLocks)                                                        \
   end_class                                                                             \
   start_class(CiCodePos)                                                                \
     oop_field(CiCodePos, caller, "Lcom/sun/cri/ci/CiCodePos;")                          \