< prev index next >

src/hotspot/share/classfile/javaClasses.hpp

Print this page
*** 249,10 ***
--- 249,11 ---
    static int _init_lock_offset;
    static int _signers_offset;
    static int _class_loader_offset;
    static int _module_offset;
    static int _component_mirror_offset;
+ 
    static int _name_offset;
    static int _source_file_offset;
    static int _classData_offset;
    static int _classRedefinedCount_offset;
    static int _reflectionData_offset;

*** 266,10 ***
--- 267,11 ---
  
    static void set_init_lock(oop java_class, oop init_lock);
    static void set_protection_domain(oop java_class, oop protection_domain);
    static void set_class_loader(oop java_class, oop class_loader);
    static void set_component_mirror(oop java_class, oop comp_mirror);
+ 
    static void initialize_mirror_fields(Klass* k, Handle mirror, Handle protection_domain,
                                         Handle classData, TRAPS);
    static void set_mirror_module_field(JavaThread* current, Klass* K, Handle mirror, Handle module);
   public:
    static void allocate_fixup_lists();

*** 310,10 ***
--- 312,11 ---
    static Klass* array_klass_acquire(oop java_class);
    static void release_set_array_klass(oop java_class, Klass* klass);
    // compiler support for class operations
    static int klass_offset()                { CHECK_INIT(_klass_offset); }
    static int array_klass_offset()          { CHECK_INIT(_array_klass_offset); }
+ 
    // Support for classRedefinedCount field
    static int classRedefinedCount(oop the_class_mirror);
    static void set_classRedefinedCount(oop the_class_mirror, int value);
  
    // Support for embedded per-class oops

*** 821,11 ***
    static int _clazz_offset;
    static int _name_offset;
    static int _type_offset;
    static int _slot_offset;
    static int _modifiers_offset;
!   static int _trusted_final_offset;
    static int _signature_offset;
    static int _annotations_offset;
  
    static void compute_offsets();
  
--- 824,11 ---
    static int _clazz_offset;
    static int _name_offset;
    static int _type_offset;
    static int _slot_offset;
    static int _modifiers_offset;
!   static int _flags_offset;
    static int _signature_offset;
    static int _annotations_offset;
  
    static void compute_offsets();
  

*** 849,11 ***
    static void set_slot(oop reflect, int value);
  
    static int modifiers(oop field);
    static void set_modifiers(oop field, int value);
  
!   static void set_trusted_final(oop field);
  
    static void set_signature(oop constructor, oop value);
    static void set_annotations(oop constructor, oop value);
  
    // Debugging
--- 852,11 ---
    static void set_slot(oop reflect, int value);
  
    static int modifiers(oop field);
    static void set_modifiers(oop field, int value);
  
!   static void set_flags(oop field, int value);
  
    static void set_signature(oop constructor, oop value);
    static void set_annotations(oop constructor, oop value);
  
    // Debugging

*** 968,12 ***
  
  // This could be separated out into 8 individual classes.
  
  class java_lang_boxing_object: AllStatic {
   private:
!   static int _value_offset;
-   static int _long_value_offset;
  
    static void compute_offsets();
    static oop initialize_and_allocate(BasicType type, TRAPS);
   public:
    // Allocation. Returns a boxed value, or null for invalid type.
--- 971,11 ---
  
  // This could be separated out into 8 individual classes.
  
  class java_lang_boxing_object: AllStatic {
   private:
!   static int* _offsets;
  
    static void compute_offsets();
    static oop initialize_and_allocate(BasicType type, TRAPS);
   public:
    // Allocation. Returns a boxed value, or null for invalid type.

*** 986,11 ***
    static bool is_instance(oop box, BasicType type) { return basic_type(box) == type; }
    static void print(oop box, outputStream* st)     { jvalue value;  print(get_value(box, &value), &value, st); }
    static void print(BasicType type, jvalue* value, outputStream* st);
  
    static int value_offset(BasicType type) {
!     return is_double_word_type(type) ? _long_value_offset : _value_offset;
    }
  
    static void serialize_offsets(SerializeClosure* f);
  
    // Debugging
--- 988,13 ---
    static bool is_instance(oop box, BasicType type) { return basic_type(box) == type; }
    static void print(oop box, outputStream* st)     { jvalue value;  print(get_value(box, &value), &value, st); }
    static void print(BasicType type, jvalue* value, outputStream* st);
  
    static int value_offset(BasicType type) {
!     assert(type >= T_BOOLEAN && type <= T_LONG, "BasicType out of range");
+     assert(_offsets != nullptr, "Uninitialized offsets");
+     return _offsets[type - T_BOOLEAN];
    }
  
    static void serialize_offsets(SerializeClosure* f);
  
    // Debugging

*** 1348,18 ***
    static bool is_method(oop obj);
  
    // Relevant integer codes (keep these in synch. with MethodHandleNatives.Constants):
    enum {
      MN_IS_METHOD             = 0x00010000, // method (not constructor)
!     MN_IS_CONSTRUCTOR        = 0x00020000, // constructor
      MN_IS_FIELD              = 0x00040000, // field
      MN_IS_TYPE               = 0x00080000, // nested type
      MN_CALLER_SENSITIVE      = 0x00100000, // @CallerSensitive annotation detected
      MN_TRUSTED_FINAL         = 0x00200000, // trusted final field
      MN_HIDDEN_MEMBER         = 0x00400000, // @Hidden annotation detected
      MN_REFERENCE_KIND_SHIFT  = 24, // refKind
!     MN_REFERENCE_KIND_MASK   = 0x0F000000 >> MN_REFERENCE_KIND_SHIFT,
      MN_NESTMATE_CLASS        = 0x00000001,
      MN_HIDDEN_CLASS          = 0x00000002,
      MN_STRONG_LOADER_LINK    = 0x00000004,
      MN_ACCESS_VM_ANNOTATIONS = 0x00000008,
      // Lookup modes
--- 1352,21 ---
    static bool is_method(oop obj);
  
    // Relevant integer codes (keep these in synch. with MethodHandleNatives.Constants):
    enum {
      MN_IS_METHOD             = 0x00010000, // method (not constructor)
!     MN_IS_OBJECT_CONSTRUCTOR = 0x00020000, // constructor
      MN_IS_FIELD              = 0x00040000, // field
      MN_IS_TYPE               = 0x00080000, // nested type
      MN_CALLER_SENSITIVE      = 0x00100000, // @CallerSensitive annotation detected
      MN_TRUSTED_FINAL         = 0x00200000, // trusted final field
      MN_HIDDEN_MEMBER         = 0x00400000, // @Hidden annotation detected
+     MN_NULL_RESTRICTED_FIELD = 0x00800000, // null-restricted field
      MN_REFERENCE_KIND_SHIFT  = 24, // refKind
!     MN_REFERENCE_KIND_MASK   = 0x0F000000 >> MN_REFERENCE_KIND_SHIFT, // 4 bits
+     MN_LAYOUT_SHIFT          = 28, // field layout
+     MN_LAYOUT_MASK           = 0x70000000 >> MN_LAYOUT_SHIFT, // 3 bits
      MN_NESTMATE_CLASS        = 0x00000001,
      MN_HIDDEN_CLASS          = 0x00000002,
      MN_STRONG_LOADER_LINK    = 0x00000004,
      MN_ACCESS_VM_ANNOTATIONS = 0x00000008,
      // Lookup modes

*** 1859,11 ***
    static void compute_offsets(InstanceKlass* k);
    static objArrayOop  cache(InstanceKlass *k);
    static void serialize_offsets(SerializeClosure* f) NOT_CDS_RETURN;
  };
  
- 
  // Interface to java.lang.InternalError objects
  
  #define INTERNALERROR_INJECTED_FIELDS(macro)                      \
    macro(java_lang_InternalError, during_unsafe_access, bool_signature, false)
  
--- 1866,10 ---
< prev index next >