< prev index next >

src/share/vm/oops/cpCache.hpp

Print this page




 345   bool      is_f1_null() const                   { Metadata* f1 = f1_ord(); return f1 == NULL; }  // classifies a CPC entry as unbound
 346   int       f2_as_index() const                  { assert(!is_vfinal(), ""); return (int) _f2; }
 347   Method*   f2_as_vfinal_method() const          { assert(is_vfinal(), ""); return (Method*)_f2; }
 348   int  field_index() const                       { assert(is_field_entry(),  ""); return (_flags & field_index_mask); }
 349   int  parameter_size() const                    { assert(is_method_entry(), ""); return (_flags & parameter_size_mask); }
 350   bool is_volatile() const                       { return (_flags & (1 << is_volatile_shift))       != 0; }
 351   bool is_final() const                          { return (_flags & (1 << is_final_shift))          != 0; }
 352   bool is_forced_virtual() const                 { return (_flags & (1 << is_forced_virtual_shift)) != 0; }
 353   bool is_vfinal() const                         { return (_flags & (1 << is_vfinal_shift))         != 0; }
 354   bool has_appendix() const                      { return (!is_f1_null()) && (_flags & (1 << has_appendix_shift))      != 0; }
 355   bool has_method_type() const                   { return (!is_f1_null()) && (_flags & (1 << has_method_type_shift))   != 0; }
 356   bool is_method_entry() const                   { return (_flags & (1 << is_field_entry_shift))    == 0; }
 357   bool is_field_entry() const                    { return (_flags & (1 << is_field_entry_shift))    != 0; }
 358   bool is_long() const                           { return flag_state() == ltos; }
 359   bool is_double() const                         { return flag_state() == dtos; }
 360   TosState flag_state() const                    { assert((uint)number_of_states <= (uint)tos_state_mask+1, "");
 361                                                    return (TosState)((_flags >> tos_state_shift) & tos_state_mask); }
 362 
 363   // Code generation support
 364   static WordSize size()                         {
 365     return in_WordSize(align_size_up((int)sizeof(ConstantPoolCacheEntry), wordSize) / wordSize);
 366   }
 367   static ByteSize size_in_bytes()                { return in_ByteSize(sizeof(ConstantPoolCacheEntry)); }
 368   static ByteSize indices_offset()               { return byte_offset_of(ConstantPoolCacheEntry, _indices); }
 369   static ByteSize f1_offset()                    { return byte_offset_of(ConstantPoolCacheEntry, _f1); }
 370   static ByteSize f2_offset()                    { return byte_offset_of(ConstantPoolCacheEntry, _f2); }
 371   static ByteSize flags_offset()                 { return byte_offset_of(ConstantPoolCacheEntry, _flags); }
 372 
 373 #if INCLUDE_JVMTI
 374   // RedefineClasses() API support:
 375   // If this ConstantPoolCacheEntry refers to old_method then update it
 376   // to refer to new_method.
 377   // trace_name_printed is set to true if the current call has
 378   // printed the klass name so that other routines in the adjust_*
 379   // group don't print the klass name.
 380   bool adjust_method_entry(Method* old_method, Method* new_method,
 381          bool* trace_name_printed);
 382   bool check_no_old_or_obsolete_entries();
 383   Method* get_interesting_method_entry(Klass* k);
 384 #endif // INCLUDE_JVMTI
 385 




 345   bool      is_f1_null() const                   { Metadata* f1 = f1_ord(); return f1 == NULL; }  // classifies a CPC entry as unbound
 346   int       f2_as_index() const                  { assert(!is_vfinal(), ""); return (int) _f2; }
 347   Method*   f2_as_vfinal_method() const          { assert(is_vfinal(), ""); return (Method*)_f2; }
 348   int  field_index() const                       { assert(is_field_entry(),  ""); return (_flags & field_index_mask); }
 349   int  parameter_size() const                    { assert(is_method_entry(), ""); return (_flags & parameter_size_mask); }
 350   bool is_volatile() const                       { return (_flags & (1 << is_volatile_shift))       != 0; }
 351   bool is_final() const                          { return (_flags & (1 << is_final_shift))          != 0; }
 352   bool is_forced_virtual() const                 { return (_flags & (1 << is_forced_virtual_shift)) != 0; }
 353   bool is_vfinal() const                         { return (_flags & (1 << is_vfinal_shift))         != 0; }
 354   bool has_appendix() const                      { return (!is_f1_null()) && (_flags & (1 << has_appendix_shift))      != 0; }
 355   bool has_method_type() const                   { return (!is_f1_null()) && (_flags & (1 << has_method_type_shift))   != 0; }
 356   bool is_method_entry() const                   { return (_flags & (1 << is_field_entry_shift))    == 0; }
 357   bool is_field_entry() const                    { return (_flags & (1 << is_field_entry_shift))    != 0; }
 358   bool is_long() const                           { return flag_state() == ltos; }
 359   bool is_double() const                         { return flag_state() == dtos; }
 360   TosState flag_state() const                    { assert((uint)number_of_states <= (uint)tos_state_mask+1, "");
 361                                                    return (TosState)((_flags >> tos_state_shift) & tos_state_mask); }
 362 
 363   // Code generation support
 364   static WordSize size()                         {
 365     return in_WordSize(align_up((int)sizeof(ConstantPoolCacheEntry), wordSize) / wordSize);
 366   }
 367   static ByteSize size_in_bytes()                { return in_ByteSize(sizeof(ConstantPoolCacheEntry)); }
 368   static ByteSize indices_offset()               { return byte_offset_of(ConstantPoolCacheEntry, _indices); }
 369   static ByteSize f1_offset()                    { return byte_offset_of(ConstantPoolCacheEntry, _f1); }
 370   static ByteSize f2_offset()                    { return byte_offset_of(ConstantPoolCacheEntry, _f2); }
 371   static ByteSize flags_offset()                 { return byte_offset_of(ConstantPoolCacheEntry, _flags); }
 372 
 373 #if INCLUDE_JVMTI
 374   // RedefineClasses() API support:
 375   // If this ConstantPoolCacheEntry refers to old_method then update it
 376   // to refer to new_method.
 377   // trace_name_printed is set to true if the current call has
 378   // printed the klass name so that other routines in the adjust_*
 379   // group don't print the klass name.
 380   bool adjust_method_entry(Method* old_method, Method* new_method,
 381          bool* trace_name_printed);
 382   bool check_no_old_or_obsolete_entries();
 383   Method* get_interesting_method_entry(Klass* k);
 384 #endif // INCLUDE_JVMTI
 385 


< prev index next >