Mercurial > hg > graal-compiler
comparison src/share/vm/ci/ciObject.cpp @ 3402:28a9fe9534ea
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
author | kvn |
---|---|
date | Tue, 24 May 2011 20:24:11 -0700 |
parents | 01fd6090fdd8 |
children | be4ca325525a c26de9aef2ed |
comparison
equal
deleted
inserted
replaced
3401:ccf072cdba91 | 3402:28a9fe9534ea |
---|---|
185 | 185 |
186 // ------------------------------------------------------------------ | 186 // ------------------------------------------------------------------ |
187 // ciObject::can_be_constant | 187 // ciObject::can_be_constant |
188 bool ciObject::can_be_constant() { | 188 bool ciObject::can_be_constant() { |
189 if (ScavengeRootsInCode >= 1) return true; // now everybody can encode as a constant | 189 if (ScavengeRootsInCode >= 1) return true; // now everybody can encode as a constant |
190 return handle() == NULL || !is_scavengable(); | 190 return handle() == NULL || is_perm(); |
191 } | 191 } |
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() { |
202 ciEnv* env = CURRENT_ENV; | 202 ciEnv* env = CURRENT_ENV; |
203 if (klass() == env->String_klass() || klass() == env->Class_klass()) { | 203 if (klass() == env->String_klass() || klass() == env->Class_klass()) { |
204 return true; | 204 return true; |
205 } | 205 } |
206 } | 206 } |
207 return handle() == NULL || !is_scavengable(); | 207 return handle() == NULL || is_perm(); |
208 } | 208 } |
209 | 209 |
210 | 210 |
211 // ------------------------------------------------------------------ | 211 // ------------------------------------------------------------------ |
212 // ciObject::print | 212 // ciObject::print |