comparison src/share/vm/oops/constantPoolOop.hpp @ 1565:ab102d5d923e

6939207: refactor constant pool index processing Summary: Factored cleanup of instruction decode which prepares for enhanced ldc semantics. Reviewed-by: twisti
author jrose
date Sun, 23 May 2010 01:38:26 -0700
parents dd57230ba8fe
children e9ff18c4ace7
comparison
equal deleted inserted replaced
1564:61b2245abf36 1565:ab102d5d923e
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);