7048030: is_scavengable changes causing compiler to embed more constants
authorkvn
Tue, 24 May 2011 20:24:11 -0700
changeset 9959 a6730101c2d0
parent 9958 dedfe67ddc58
child 9960 43fe83652b18
7048030: is_scavengable changes causing compiler to embed more constants Summary: ciObject::can_be_constant() and should_be_constant() should use is_perm() instead of !is_scavengable() Reviewed-by: never, jrose
hotspot/src/share/vm/ci/ciObject.cpp
hotspot/src/share/vm/ci/ciObject.hpp
--- a/hotspot/src/share/vm/ci/ciObject.cpp	Tue May 24 15:30:05 2011 -0700
+++ b/hotspot/src/share/vm/ci/ciObject.cpp	Tue May 24 20:24:11 2011 -0700
@@ -187,7 +187,7 @@
 // ciObject::can_be_constant
 bool ciObject::can_be_constant() {
   if (ScavengeRootsInCode >= 1)  return true;  // now everybody can encode as a constant
-  return handle() == NULL || !is_scavengable();
+  return handle() == NULL || is_perm();
 }
 
 // ------------------------------------------------------------------
@@ -204,7 +204,7 @@
       return true;
     }
   }
-  return handle() == NULL || !is_scavengable();
+  return handle() == NULL || is_perm();
 }
 
 
--- a/hotspot/src/share/vm/ci/ciObject.hpp	Tue May 24 15:30:05 2011 -0700
+++ b/hotspot/src/share/vm/ci/ciObject.hpp	Tue May 24 20:24:11 2011 -0700
@@ -108,7 +108,7 @@
   int hash();
 
   // Tells if this oop has an encoding as a constant.
-  // True if is_scavengable is false.
+  // True if is_perm is true.
   // Also true if ScavengeRootsInCode is non-zero.
   // If it does not have an encoding, the compiler is responsible for
   // making other arrangements for dealing with the oop.
@@ -116,7 +116,7 @@
   bool can_be_constant();
 
   // Tells if this oop should be made a constant.
-  // True if is_scavengable is false or ScavengeRootsInCode > 1.
+  // True if is_perm is true or ScavengeRootsInCode > 1.
   bool should_be_constant();
 
   // Is this object guaranteed to be in the permanent part of the heap?