/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*
*/
#include "classfile/systemDictionary.hpp"
#include "oops/instanceKlass.hpp"
#include "utilities/hashtable.hpp"
class DictionaryEntry;
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// The data structure for the system dictionary (and the shared system
// dictionary).
friend class VMStructs;
private:
// current iteration index.
static int _current_class_index;
// pointer to the current hash table entry.
}
// The following method is not MT-safe and must be done under lock.
}
}
public:
Dictionary(int table_size);
// Compiler support
// GC support
void oops_do(OopClosure* f);
void classes_do(void f(klassOop));
void methods_do(void f(methodOop));
// Classes loaded by the bootstrap loader are always strongly reachable.
// If we're not doing class unloading, all classes are strongly reachable.
}
// Unload (that is, break root links to) all unmarked classes and
// loaders. Returns "true" iff something was unloaded.
// Protection domains
// Sharing support
void reorder_dictionary();
#ifndef PRODUCT
void print();
#endif
void verify();
};
// The following classes can be in dictionary.cpp, but we need these
// to be in header file so that SA's vmStructs can access.
friend class VMStructs;
public:
}
};
// An entry in the system dictionary, this describes a class as
// { klassOop, loader, protection_domain }.
friend class VMStructs;
private:
// Contains the set of approved protection domains that can access
// this system dictionary entry.
public:
// Tells whether a protection is in the approved set.
// Adds a protection domain to the approved set.
}
}
// Tells whether the initiating class' protection can access the this _klass
if (!ProtectionDomainVerification) return true;
if (!SystemDictionary::has_checkPackageAccess()) return true;
return protection_domain() == NULL
? true
}
}
}
void verify_protection_domain_set() {
}
}
_loader == class_loader);
}
void print() {
int count = 0;
count++;
}
}
};
// Entry in a SymbolPropertyTable, mapping a single Symbol*
// to a managed and an unmanaged pointer.
friend class VMStructs;
private:
public:
}
}
bool printed = false;
if (property_oop() != NULL) {
printed = true;
}
if (property_data() != NULL) {
printed = true;
}
}
};
// A system-internal mapping of symbols to pointers, both managed
// and unmanaged. Used to record the auto-generation of each method
// MethodHandle.invoke(S)T, for all signatures (S)T.
friend class VMStructs;
private:
}
// The following method is not MT-safe and must be done under lock.
}
}
}
SymbolPropertyEntry* entry = (SymbolPropertyEntry*) Hashtable<Symbol*, mtSymbol>::new_entry(hash, symbol);
// Hashtable with Symbol* literal must increment and decrement refcount.
return entry;
}
public:
// decrement Symbol refcount here because hashtable doesn't.
}
// Use the regular identity_hash.
}
}
// need not be locked; no state change
// must be done under SystemDictionary_lock
// GC support
void oops_do(OopClosure* f);
void methods_do(void f(methodOop));
// Sharing support
void reorder_dictionary();
#ifndef PRODUCT
void print();
#endif
void verify();
};
#endif // SHARE_VM_CLASSFILE_DICTIONARY_HPP