247 return k(); |
247 return k(); |
248 } |
248 } |
249 } |
249 } |
250 |
250 |
251 |
251 |
252 symbolOop constantPoolOopDesc::uncached_name_ref_at(int which) { |
252 symbolOop constantPoolOopDesc::impl_name_ref_at(int which, bool uncached) { |
253 jint ref_index = name_and_type_at(uncached_name_and_type_ref_index_at(which)); |
253 int name_index = name_ref_index_at(impl_name_and_type_ref_index_at(which, uncached)); |
254 int name_index = extract_low_short_from_int(ref_index); |
|
255 return symbol_at(name_index); |
254 return symbol_at(name_index); |
256 } |
255 } |
257 |
256 |
258 |
257 |
259 symbolOop constantPoolOopDesc::uncached_signature_ref_at(int which) { |
258 symbolOop constantPoolOopDesc::impl_signature_ref_at(int which, bool uncached) { |
260 jint ref_index = name_and_type_at(uncached_name_and_type_ref_index_at(which)); |
259 int signature_index = signature_ref_index_at(impl_name_and_type_ref_index_at(which, uncached)); |
261 int signature_index = extract_high_short_from_int(ref_index); |
|
262 return symbol_at(signature_index); |
260 return symbol_at(signature_index); |
263 } |
261 } |
264 |
262 |
265 |
263 |
266 int constantPoolOopDesc::uncached_name_and_type_ref_index_at(int which) { |
264 int constantPoolOopDesc::impl_name_and_type_ref_index_at(int which, bool uncached) { |
267 jint ref_index = field_or_method_at(which, true); |
265 jint ref_index = field_or_method_at(which, uncached); |
268 return extract_high_short_from_int(ref_index); |
266 return extract_high_short_from_int(ref_index); |
269 } |
267 } |
270 |
268 |
271 |
269 |
272 int constantPoolOopDesc::uncached_klass_ref_index_at(int which) { |
270 int constantPoolOopDesc::impl_klass_ref_index_at(int which, bool uncached) { |
273 jint ref_index = field_or_method_at(which, true); |
271 jint ref_index = field_or_method_at(which, uncached); |
274 return extract_low_short_from_int(ref_index); |
272 return extract_low_short_from_int(ref_index); |
|
273 } |
|
274 |
|
275 |
|
276 |
|
277 int constantPoolOopDesc::map_instruction_operand_to_index(int operand) { |
|
278 if (constantPoolCacheOopDesc::is_secondary_index(operand)) { |
|
279 return cache()->main_entry_at(operand)->constant_pool_index(); |
|
280 } |
|
281 assert((int)(u2)operand == operand, "clean u2"); |
|
282 int index = Bytes::swap_u2(operand); |
|
283 return cache()->entry_at(index)->constant_pool_index(); |
275 } |
284 } |
276 |
285 |
277 |
286 |
278 void constantPoolOopDesc::verify_constant_pool_resolve(constantPoolHandle this_oop, KlassHandle k, TRAPS) { |
287 void constantPoolOopDesc::verify_constant_pool_resolve(constantPoolHandle this_oop, KlassHandle k, TRAPS) { |
279 if (k->oop_is_instance() || k->oop_is_objArray()) { |
288 if (k->oop_is_instance() || k->oop_is_objArray()) { |
288 } |
297 } |
289 } |
298 } |
290 } |
299 } |
291 |
300 |
292 |
301 |
293 int constantPoolOopDesc::klass_ref_index_at(int which) { |
302 int constantPoolOopDesc::name_ref_index_at(int which_nt) { |
294 jint ref_index = field_or_method_at(which, false); |
303 jint ref_index = name_and_type_at(which_nt); |
295 return extract_low_short_from_int(ref_index); |
304 return extract_low_short_from_int(ref_index); |
296 } |
305 } |
297 |
306 |
298 |
307 |
299 int constantPoolOopDesc::name_and_type_ref_index_at(int which) { |
308 int constantPoolOopDesc::signature_ref_index_at(int which_nt) { |
300 jint ref_index = field_or_method_at(which, false); |
309 jint ref_index = name_and_type_at(which_nt); |
301 return extract_high_short_from_int(ref_index); |
|
302 } |
|
303 |
|
304 |
|
305 int constantPoolOopDesc::name_ref_index_at(int which) { |
|
306 jint ref_index = name_and_type_at(which); |
|
307 return extract_low_short_from_int(ref_index); |
|
308 } |
|
309 |
|
310 |
|
311 int constantPoolOopDesc::signature_ref_index_at(int which) { |
|
312 jint ref_index = name_and_type_at(which); |
|
313 return extract_high_short_from_int(ref_index); |
310 return extract_high_short_from_int(ref_index); |
314 } |
311 } |
315 |
312 |
316 |
313 |
317 klassOop constantPoolOopDesc::klass_ref_at(int which, TRAPS) { |
314 klassOop constantPoolOopDesc::klass_ref_at(int which, TRAPS) { |
351 return (char*)"<pseudo-string>"; |
348 return (char*)"<pseudo-string>"; |
352 } |
349 } |
353 } |
350 } |
354 |
351 |
355 |
352 |
356 symbolOop constantPoolOopDesc::name_ref_at(int which) { |
|
357 jint ref_index = name_and_type_at(name_and_type_ref_index_at(which)); |
|
358 int name_index = extract_low_short_from_int(ref_index); |
|
359 return symbol_at(name_index); |
|
360 } |
|
361 |
|
362 |
|
363 symbolOop constantPoolOopDesc::signature_ref_at(int which) { |
|
364 jint ref_index = name_and_type_at(name_and_type_ref_index_at(which)); |
|
365 int signature_index = extract_high_short_from_int(ref_index); |
|
366 return symbol_at(signature_index); |
|
367 } |
|
368 |
|
369 |
|
370 BasicType constantPoolOopDesc::basic_type_for_signature_at(int which) { |
353 BasicType constantPoolOopDesc::basic_type_for_signature_at(int which) { |
371 return FieldType::basic_type(symbol_at(which)); |
354 return FieldType::basic_type(symbol_at(which)); |
372 } |
355 } |
373 |
356 |
374 |
357 |