< prev index next > src/hotspot/share/classfile/placeholders.hpp
Print this page
// 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
};
// 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
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);
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() {
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 >