diff --git a/src/share/vm/ci/ciObject.cpp b/src/share/vm/ci/ciObject.cpp index 031f584d22cbf476907051421aef69f1d4888d8d..b7dd1e5e53717cd644f2e87c694d57dfae5ff59b 100644 --- a/src/share/vm/ci/ciObject.cpp +++ b/src/share/vm/ci/ciObject.cpp @@ -187,7 +187,7 @@ jobject ciObject::constant_encoding() { // 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 @@ bool ciObject::should_be_constant() { return true; } } - return handle() == NULL || !is_scavengable(); + return handle() == NULL || is_perm(); } diff --git a/src/share/vm/ci/ciObject.hpp b/src/share/vm/ci/ciObject.hpp index 2542d150b6bb13d36d272e2aefd52232651f3de8..be461038758b9f0cb7e20e3693283aa9daf1cbbc 100644 --- a/src/share/vm/ci/ciObject.hpp +++ b/src/share/vm/ci/ciObject.hpp @@ -108,7 +108,7 @@ public: 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 @@ public: 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?