1 /* |
1 /* |
2 * Copyright 1997-2009 Sun Microsystems, Inc. All Rights Reserved. |
2 * Copyright 1997-2010 Sun Microsystems, Inc. All Rights Reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
432 void shared_strings_iterate(OopClosure* closure0); |
432 void shared_strings_iterate(OopClosure* closure0); |
433 |
433 |
434 // Debugging |
434 // Debugging |
435 const char* printable_name_at(int which) PRODUCT_RETURN0; |
435 const char* printable_name_at(int which) PRODUCT_RETURN0; |
436 |
436 |
|
437 #ifdef ASSERT |
|
438 enum { CPCACHE_INDEX_TAG = 0x10000 }; // helps keep CP cache indices distinct from CP indices |
|
439 #endif //ASSERT |
|
440 |
437 private: |
441 private: |
438 |
442 |
439 symbolOop impl_name_ref_at(int which, bool uncached); |
443 symbolOop impl_name_ref_at(int which, bool uncached); |
440 symbolOop impl_signature_ref_at(int which, bool uncached); |
444 symbolOop impl_signature_ref_at(int which, bool uncached); |
441 int impl_klass_ref_index_at(int which, bool uncached); |
445 int impl_klass_ref_index_at(int which, bool uncached); |
442 int impl_name_and_type_ref_index_at(int which, bool uncached); |
446 int impl_name_and_type_ref_index_at(int which, bool uncached); |
443 |
447 |
444 int remap_instruction_operand_from_cache(int operand); |
448 int remap_instruction_operand_from_cache(int operand); // operand must be biased by CPCACHE_INDEX_TAG |
445 |
449 |
446 // Used while constructing constant pool (only by ClassFileParser) |
450 // Used while constructing constant pool (only by ClassFileParser) |
447 jint klass_index_at(int which) { |
451 jint klass_index_at(int which) { |
448 assert(tag_at(which).is_klass_index(), "Corrupted constant pool"); |
452 assert(tag_at(which).is_klass_index(), "Corrupted constant pool"); |
449 return *int_at_addr(which); |
453 return *int_at_addr(which); |