< prev index next >

src/hotspot/share/classfile/placeholders.hpp

Print this page
@@ -45,15 +45,17 @@
    // LOAD_SUPER needed to check for class circularity
    // DEFINE_CLASS: ultimately define class must be single threaded
    // on a class/classloader basis
    // so the head of that queue owns the token
    // and the rest of the threads return the result the first thread gets
+   // PRIMITIVE_OBJECT_FIELD: needed to check for inline type fields circularity
    enum classloadAction {
      LOAD_INSTANCE = 1,             // calling load_instance_class
      LOAD_SUPER = 2,                // loading superclass for this class
-     DEFINE_CLASS = 3               // find_or_define class
-   };
+     DEFINE_CLASS = 3,              // find_or_define class
+     PRIMITIVE_OBJECT_FIELD = 4     // primitive object fields
+  };
  
    static PlaceholderEntry* get_entry(Symbol* name, ClassLoaderData* loader_data);
  
    // find_and_add returns probe pointer - old or new
    // If no entry exists, add a placeholder entry and push SeenThread for classloadAction

@@ -91,10 +93,11 @@
  
    SeenThread*       _defineThreadQ; // queue of Threads trying to define this class
                                      // including _definer
                                      // _definer owns token
                                      // queue waits for and returns results from _definer
+   SeenThread*       _inlineTypeFieldQ;  // queue of inline types for circularity checking
  
    SeenThread* actionToQueue(PlaceholderTable::classloadAction action);
    void set_threadQ(SeenThread* seenthread, PlaceholderTable::classloadAction action);
    void add_seen_thread(JavaThread* thread, PlaceholderTable::classloadAction action);
    bool remove_seen_thread(JavaThread* thread, PlaceholderTable::classloadAction action);

@@ -108,21 +111,25 @@
    SeenThread*        defineThreadQ()       const { return _defineThreadQ; }
    void               set_defineThreadQ(SeenThread* SeenThread) { _defineThreadQ = SeenThread; }
   public:
    PlaceholderEntry() :
       _definer(nullptr), _instanceKlass(nullptr),
-      _superThreadQ(nullptr), _loadInstanceThreadQ(nullptr), _defineThreadQ(nullptr) { }
+      _superThreadQ(nullptr), _loadInstanceThreadQ(nullptr), _defineThreadQ(nullptr),
+      _inlineTypeFieldQ(nullptr) { }
  
    Symbol*            supername()           const { return _supername; }
    void               set_supername(Symbol* supername);
  
    JavaThread*        definer()             const {return _definer; }
    void               set_definer(JavaThread* definer) { _definer = definer; }
  
    InstanceKlass*     instance_klass()      const {return _instanceKlass; }
    void               set_instance_klass(InstanceKlass* ik) { _instanceKlass = ik; }
  
+   SeenThread*        inlineTypeFieldQ()    const { return _inlineTypeFieldQ; }
+   void               set_inlineTypeFieldQ(SeenThread* SeenThread) { _inlineTypeFieldQ = SeenThread; }
+ 
    bool super_load_in_progress() {
       return (_superThreadQ != nullptr);
    }
  
    bool instance_load_in_progress() {

@@ -131,10 +138,14 @@
  
    bool define_class_in_progress() {
      return (_defineThreadQ != nullptr);
    }
  
+   bool inline_type_field_in_progress() {
+     return (_inlineTypeFieldQ != nullptr);
+   }
+ 
    // Used for ClassCircularityError checking
    bool check_seen_thread(JavaThread* thread, PlaceholderTable::classloadAction action);
  
    void print_on(outputStream* st) const;
  };
< prev index next >