Mercurial > hg > graal-compiler
comparison src/share/vm/ci/ciInstanceKlass.cpp @ 10408:836a62f43af9
Merge with http://hg.openjdk.java.net/hsx/hsx25/hotspot/
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Wed, 19 Jun 2013 10:45:56 +0200 |
parents | 5fc51c1ecdeb 6f3fd5150b67 |
children | cefad50507d8 |
comparison
equal
deleted
inserted
replaced
10086:e0fb8a213650 | 10408:836a62f43af9 |
---|---|
209 return equals(CURRENT_ENV->Object_klass()); | 209 return equals(CURRENT_ENV->Object_klass()); |
210 } | 210 } |
211 | 211 |
212 // ------------------------------------------------------------------ | 212 // ------------------------------------------------------------------ |
213 // ciInstanceKlass::uses_default_loader | 213 // ciInstanceKlass::uses_default_loader |
214 bool ciInstanceKlass::uses_default_loader() { | 214 bool ciInstanceKlass::uses_default_loader() const { |
215 // Note: We do not need to resolve the handle or enter the VM | 215 // Note: We do not need to resolve the handle or enter the VM |
216 // in order to test null-ness. | 216 // in order to test null-ness. |
217 return _loader == NULL; | 217 return _loader == NULL; |
218 } | |
219 | |
220 // ------------------------------------------------------------------ | |
221 | |
222 /** | |
223 * Return basic type of boxed value for box klass or T_OBJECT if not. | |
224 */ | |
225 BasicType ciInstanceKlass::box_klass_type() const { | |
226 if (uses_default_loader() && is_loaded()) { | |
227 return SystemDictionary::box_klass_type(get_Klass()); | |
228 } else { | |
229 return T_OBJECT; | |
230 } | |
231 } | |
232 | |
233 /** | |
234 * Is this boxing klass? | |
235 */ | |
236 bool ciInstanceKlass::is_box_klass() const { | |
237 return is_java_primitive(box_klass_type()); | |
238 } | |
239 | |
240 /** | |
241 * Is this boxed value offset? | |
242 */ | |
243 bool ciInstanceKlass::is_boxed_value_offset(int offset) const { | |
244 BasicType bt = box_klass_type(); | |
245 return is_java_primitive(bt) && | |
246 (offset == java_lang_boxing_object::value_offset_in_bytes(bt)); | |
218 } | 247 } |
219 | 248 |
220 // ------------------------------------------------------------------ | 249 // ------------------------------------------------------------------ |
221 // ciInstanceKlass::is_in_package | 250 // ciInstanceKlass::is_in_package |
222 // | 251 // |