equal
deleted
inserted
replaced
192 |
192 |
193 // ------------------------------------------------------------------ |
193 // ------------------------------------------------------------------ |
194 // ciObject::should_be_constant() |
194 // ciObject::should_be_constant() |
195 bool ciObject::should_be_constant() { |
195 bool ciObject::should_be_constant() { |
196 if (ScavengeRootsInCode >= 2) return true; // force everybody to be a constant |
196 if (ScavengeRootsInCode >= 2) return true; // force everybody to be a constant |
|
197 if (!JavaObjectsInPerm && !is_null_object()) { |
|
198 // We want Strings and Classes to be embeddable by default since |
|
199 // they used to be in the perm world. Not all Strings used to be |
|
200 // embeddable but there's no easy way to distinguish the interned |
|
201 // from the regulars ones so just treat them all that way. |
|
202 ciEnv* env = CURRENT_ENV; |
|
203 if (klass() == env->String_klass() || klass() == env->Class_klass()) { |
|
204 return true; |
|
205 } |
|
206 } |
197 return handle() == NULL || !is_scavengable(); |
207 return handle() == NULL || !is_scavengable(); |
198 } |
208 } |
199 |
209 |
200 |
210 |
201 // ------------------------------------------------------------------ |
211 // ------------------------------------------------------------------ |