< prev index next >

src/hotspot/share/oops/constantPool.hpp

Print this page

 264   ConstantPoolCacheEntry* invokedynamic_cp_cache_entry_at(int indy_index) const {
 265     // decode index that invokedynamic points to.
 266     int cp_cache_index = invokedynamic_cp_cache_index(indy_index);
 267     return cache()->entry_at(cp_cache_index);
 268   }
 269   // Given the per-instruction index of an indy instruction, report the
 270   // main constant pool entry for its bootstrap specifier.
 271   // From there, uncached_name/signature_ref_at will get the name/type.
 272   int invokedynamic_bootstrap_ref_index_at(int indy_index) const {
 273     return invokedynamic_cp_cache_entry_at(indy_index)->constant_pool_index();
 274   }
 275 
 276   // Assembly code support
 277   static int tags_offset_in_bytes()         { return offset_of(ConstantPool, _tags); }
 278   static int cache_offset_in_bytes()        { return offset_of(ConstantPool, _cache); }
 279   static int pool_holder_offset_in_bytes()  { return offset_of(ConstantPool, _pool_holder); }
 280   static int resolved_klasses_offset_in_bytes()    { return offset_of(ConstantPool, _resolved_klasses); }
 281 
 282   // Storing constants
 283 
 284   // For temporary use while constructing constant pool
 285   void klass_index_at_put(int which, int name_index) {
 286     tag_at_put(which, JVM_CONSTANT_ClassIndex);
 287     *int_at_addr(which) = name_index;
 288   }
 289 
 290   // Hidden class support:
 291   void klass_at_put(int class_index, Klass* k);
 292 









 293   void unresolved_klass_at_put(int which, int name_index, int resolved_klass_index) {
 294     release_tag_at_put(which, JVM_CONSTANT_UnresolvedClass);
 295 
 296     assert((name_index & 0xffff0000) == 0, "must be");
 297     assert((resolved_klass_index & 0xffff0000) == 0, "must be");
 298     *int_at_addr(which) =
 299       build_int_from_shorts((jushort)resolved_klass_index, (jushort)name_index);
 300   }
 301 
 302   void method_handle_index_at_put(int which, int ref_kind, int ref_index) {
 303     tag_at_put(which, JVM_CONSTANT_MethodHandle);
 304     *int_at_addr(which) = ((jint) ref_index<<16) | ref_kind;
 305   }
 306 
 307   void method_type_index_at_put(int which, int ref_index) {
 308     tag_at_put(which, JVM_CONSTANT_MethodType);
 309     *int_at_addr(which) = ref_index;
 310   }
 311 
 312   void dynamic_constant_at_put(int which, int bsms_attribute_index, int name_and_type_index) {

 264   ConstantPoolCacheEntry* invokedynamic_cp_cache_entry_at(int indy_index) const {
 265     // decode index that invokedynamic points to.
 266     int cp_cache_index = invokedynamic_cp_cache_index(indy_index);
 267     return cache()->entry_at(cp_cache_index);
 268   }
 269   // Given the per-instruction index of an indy instruction, report the
 270   // main constant pool entry for its bootstrap specifier.
 271   // From there, uncached_name/signature_ref_at will get the name/type.
 272   int invokedynamic_bootstrap_ref_index_at(int indy_index) const {
 273     return invokedynamic_cp_cache_entry_at(indy_index)->constant_pool_index();
 274   }
 275 
 276   // Assembly code support
 277   static int tags_offset_in_bytes()         { return offset_of(ConstantPool, _tags); }
 278   static int cache_offset_in_bytes()        { return offset_of(ConstantPool, _cache); }
 279   static int pool_holder_offset_in_bytes()  { return offset_of(ConstantPool, _pool_holder); }
 280   static int resolved_klasses_offset_in_bytes()    { return offset_of(ConstantPool, _resolved_klasses); }
 281 
 282   // Storing constants
 283 
 284   // For temporary use while constructing constant pool. Used during a retransform/class redefinition as well.
 285   void klass_index_at_put(int which, int name_index) {
 286     tag_at_put(which, JVM_CONSTANT_ClassIndex);
 287     *int_at_addr(which) = name_index;
 288   }
 289 
 290   // Hidden class support:
 291   void klass_at_put(int class_index, Klass* k);
 292 
 293   void unresolved_qdescriptor_at_put(int which, int name_index, int resolved_klass_index) {
 294       release_tag_at_put(which, JVM_CONSTANT_UnresolvedClass | (jbyte) JVM_CONSTANT_QDescBit);
 295 
 296       assert((name_index & 0xffff0000) == 0, "must be");
 297       assert((resolved_klass_index & 0xffff0000) == 0, "must be");
 298       *int_at_addr(which) =
 299         build_int_from_shorts((jushort)resolved_klass_index, (jushort)name_index);
 300     }
 301 
 302   void unresolved_klass_at_put(int which, int name_index, int resolved_klass_index) {
 303     release_tag_at_put(which, JVM_CONSTANT_UnresolvedClass);
 304 
 305     assert((name_index & 0xffff0000) == 0, "must be");
 306     assert((resolved_klass_index & 0xffff0000) == 0, "must be");
 307     *int_at_addr(which) =
 308       build_int_from_shorts((jushort)resolved_klass_index, (jushort)name_index);
 309   }
 310 
 311   void method_handle_index_at_put(int which, int ref_kind, int ref_index) {
 312     tag_at_put(which, JVM_CONSTANT_MethodHandle);
 313     *int_at_addr(which) = ((jint) ref_index<<16) | ref_kind;
 314   }
 315 
 316   void method_type_index_at_put(int which, int ref_index) {
 317     tag_at_put(which, JVM_CONSTANT_MethodType);
 318     *int_at_addr(which) = ref_index;
 319   }
 320 
 321   void dynamic_constant_at_put(int which, int bsms_attribute_index, int name_and_type_index) {
< prev index next >