< prev index next >

src/hotspot/share/classfile/placeholders.hpp

Print this page
*** 71,14 ***
  // 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
   enum classloadAction {
      LOAD_INSTANCE = 1,             // calling load_instance_class
      LOAD_SUPER = 2,                // loading superclass for this class
!     DEFINE_CLASS = 3               // find_or_define class
   };
  
    // find_and_add returns probe pointer - old or new
    // If no entry exists, add a placeholder entry and push SeenThread for classloadAction
    // If entry exists, reuse entry and push SeenThread for classloadAction
--- 71,16 ---
  // 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
+ // INLINE_TYPE_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
+     INLINE_TYPE_FIELD = 4          // inline type fields
   };
  
    // find_and_add returns probe pointer - old or new
    // If no entry exists, add a placeholder entry and push SeenThread for classloadAction
    // If entry exists, reuse entry and push SeenThread for classloadAction

*** 125,10 ***
--- 127,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);

*** 159,10 ***
--- 162,13 ---
    void               set_loadInstanceThreadQ(SeenThread* SeenThread) { _loadInstanceThreadQ = SeenThread; }
  
    SeenThread*        defineThreadQ()       const { return _defineThreadQ; }
    void               set_defineThreadQ(SeenThread* SeenThread) { _defineThreadQ = SeenThread; }
  
+   SeenThread*        inlineTypeFieldQ()    const { return _inlineTypeFieldQ; }
+   void               set_inlineTypeFieldQ(SeenThread* SeenThread) { _inlineTypeFieldQ = SeenThread; }
+ 
    PlaceholderEntry* next() const {
      return (PlaceholderEntry*)HashtableEntry<Symbol*, mtClass>::next();
    }
  
    PlaceholderEntry** next_addr() {

*** 185,10 ***
--- 191,14 ---
  
    bool define_class_in_progress() {
      return (_defineThreadQ != NULL);
    }
  
+   bool inline_type_field_in_progress() {
+     return (_inlineTypeFieldQ != NULL);
+   }
+ 
    // Used for ClassCircularityError checking
    bool check_seen_thread(JavaThread* thread, PlaceholderTable::classloadAction action);
  
    // Print method doesn't append a cr
    void print_entry(outputStream* st) const;
< prev index next >