Tue, 24 May 2011 20:24:11 -0700
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
src/share/vm/ci/ciObject.cpp | file | annotate | diff | comparison | revisions | |
src/share/vm/ci/ciObject.hpp | file | annotate | diff | comparison | revisions |
1.1 --- a/src/share/vm/ci/ciObject.cpp Tue May 24 15:30:05 2011 -0700 1.2 +++ b/src/share/vm/ci/ciObject.cpp Tue May 24 20:24:11 2011 -0700 1.3 @@ -187,7 +187,7 @@ 1.4 // ciObject::can_be_constant 1.5 bool ciObject::can_be_constant() { 1.6 if (ScavengeRootsInCode >= 1) return true; // now everybody can encode as a constant 1.7 - return handle() == NULL || !is_scavengable(); 1.8 + return handle() == NULL || is_perm(); 1.9 } 1.10 1.11 // ------------------------------------------------------------------ 1.12 @@ -204,7 +204,7 @@ 1.13 return true; 1.14 } 1.15 } 1.16 - return handle() == NULL || !is_scavengable(); 1.17 + return handle() == NULL || is_perm(); 1.18 } 1.19 1.20
2.1 --- a/src/share/vm/ci/ciObject.hpp Tue May 24 15:30:05 2011 -0700 2.2 +++ b/src/share/vm/ci/ciObject.hpp Tue May 24 20:24:11 2011 -0700 2.3 @@ -108,7 +108,7 @@ 2.4 int hash(); 2.5 2.6 // Tells if this oop has an encoding as a constant. 2.7 - // True if is_scavengable is false. 2.8 + // True if is_perm is true. 2.9 // Also true if ScavengeRootsInCode is non-zero. 2.10 // If it does not have an encoding, the compiler is responsible for 2.11 // making other arrangements for dealing with the oop. 2.12 @@ -116,7 +116,7 @@ 2.13 bool can_be_constant(); 2.14 2.15 // Tells if this oop should be made a constant. 2.16 - // True if is_scavengable is false or ScavengeRootsInCode > 1. 2.17 + // True if is_perm is true or ScavengeRootsInCode > 1. 2.18 bool should_be_constant(); 2.19 2.20 // Is this object guaranteed to be in the permanent part of the heap?