Mercurial > hg > truffle
comparison src/share/vm/oops/constantPoolOop.cpp @ 3461:81d815b05abb
7056328: JSR 292 invocation sometimes fails in adapters for types not on boot class path
Reviewed-by: never
author | jrose |
---|---|
date | Thu, 23 Jun 2011 17:14:06 -0700 |
parents | ed69575596ac |
children | f08d439fab8c |
comparison
equal
deleted
inserted
replaced
3460:e9b51b4bdcc7 | 3461:81d815b05abb |
---|---|
261 | 261 |
262 // Do access check for klasses | 262 // Do access check for klasses |
263 if( k.not_null() ) verify_constant_pool_resolve(this_oop, k, CHECK_NULL); | 263 if( k.not_null() ) verify_constant_pool_resolve(this_oop, k, CHECK_NULL); |
264 return k(); | 264 return k(); |
265 } | 265 } |
266 } | |
267 | |
268 | |
269 methodOop constantPoolOopDesc::method_at_if_loaded(constantPoolHandle cpool, | |
270 int which, Bytecodes::Code invoke_code) { | |
271 assert(!constantPoolCacheOopDesc::is_secondary_index(which), "no indy instruction here"); | |
272 if (cpool->cache() == NULL) return false; // nothing to load yet | |
273 int cache_index = which - CPCACHE_INDEX_TAG; | |
274 if (!(cache_index >= 0 && cache_index < cpool->cache()->length())) { | |
275 if (PrintMiscellaneous && (Verbose||WizardMode)) { | |
276 tty->print_cr("bad operand %d for %d in:", which, invoke_code); cpool->print(); | |
277 } | |
278 return NULL; | |
279 } | |
280 ConstantPoolCacheEntry* e = cpool->cache()->entry_at(cache_index); | |
281 if (invoke_code != Bytecodes::_illegal) | |
282 return e->get_method_if_resolved(invoke_code, cpool); | |
283 Bytecodes::Code bc; | |
284 if ((bc = e->bytecode_1()) != (Bytecodes::Code)0) | |
285 return e->get_method_if_resolved(bc, cpool); | |
286 if ((bc = e->bytecode_2()) != (Bytecodes::Code)0) | |
287 return e->get_method_if_resolved(bc, cpool); | |
288 return NULL; | |
266 } | 289 } |
267 | 290 |
268 | 291 |
269 Symbol* constantPoolOopDesc::impl_name_ref_at(int which, bool uncached) { | 292 Symbol* constantPoolOopDesc::impl_name_ref_at(int which, bool uncached) { |
270 int name_index = name_ref_index_at(impl_name_and_type_ref_index_at(which, uncached)); | 293 int name_index = name_ref_index_at(impl_name_and_type_ref_index_at(which, uncached)); |