mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8176705: Remove static functions in InstanceKlass
Change static functions to instance functions and remove their 'this_k' parameters. Reviewed-by: dholmes, mgerdin, iklam
This commit is contained in:
parent
dd84bb9cff
commit
3af1da4533
4 changed files with 175 additions and 225 deletions
|
@ -464,16 +464,10 @@ class InstanceKlass: public Klass {
|
|||
const Symbol* class_name2);
|
||||
|
||||
// find an enclosing class
|
||||
InstanceKlass* compute_enclosing_class(bool* inner_is_member, TRAPS) const {
|
||||
return compute_enclosing_class_impl(this, inner_is_member, THREAD);
|
||||
}
|
||||
static InstanceKlass* compute_enclosing_class_impl(const InstanceKlass* self,
|
||||
bool* inner_is_member,
|
||||
TRAPS);
|
||||
InstanceKlass* compute_enclosing_class(bool* inner_is_member, TRAPS) const;
|
||||
|
||||
// Find InnerClasses attribute for k and return outer_class_info_index & inner_name_index.
|
||||
static bool find_inner_classes_attr(const InstanceKlass* k,
|
||||
int* ooff, int* noff, TRAPS);
|
||||
// Find InnerClasses attribute and return outer_class_info_index & inner_name_index.
|
||||
bool find_inner_classes_attr(int* ooff, int* noff, TRAPS) const;
|
||||
|
||||
private:
|
||||
// Check prohibited package ("java/" only loadable by boot or platform loaders)
|
||||
|
@ -482,12 +476,7 @@ class InstanceKlass: public Klass {
|
|||
TRAPS);
|
||||
public:
|
||||
// tell if two classes have the same enclosing class (at package level)
|
||||
bool is_same_package_member(const Klass* class2, TRAPS) const {
|
||||
return is_same_package_member_impl(this, class2, THREAD);
|
||||
}
|
||||
static bool is_same_package_member_impl(const InstanceKlass* self,
|
||||
const Klass* class2,
|
||||
TRAPS);
|
||||
bool is_same_package_member(const Klass* class2, TRAPS) const;
|
||||
|
||||
// initialization state
|
||||
bool is_loaded() const { return _init_state >= loaded; }
|
||||
|
@ -883,10 +872,9 @@ public:
|
|||
u2 method_index);
|
||||
|
||||
// jmethodID support
|
||||
static jmethodID get_jmethod_id(InstanceKlass* ik,
|
||||
const methodHandle& method_h);
|
||||
static jmethodID get_jmethod_id_fetch_or_update(InstanceKlass* ik,
|
||||
size_t idnum, jmethodID new_id, jmethodID* new_jmeths,
|
||||
jmethodID get_jmethod_id(const methodHandle& method_h);
|
||||
jmethodID get_jmethod_id_fetch_or_update(size_t idnum,
|
||||
jmethodID new_id, jmethodID* new_jmeths,
|
||||
jmethodID* to_dealloc_id_p,
|
||||
jmethodID** to_dealloc_jmeths_p);
|
||||
static void get_jmethod_id_length_value(jmethodID* cache, size_t idnum,
|
||||
|
@ -1306,19 +1294,13 @@ public:
|
|||
private:
|
||||
void fence_and_clear_init_lock();
|
||||
|
||||
// Static methods that are used to implement member methods where an exposed this pointer
|
||||
// is needed due to possible GCs
|
||||
static bool link_class_impl (InstanceKlass* this_k, bool throw_verifyerror, TRAPS);
|
||||
static bool verify_code (InstanceKlass* this_k, bool throw_verifyerror, TRAPS);
|
||||
static void initialize_impl (InstanceKlass* this_k, TRAPS);
|
||||
static void initialize_super_interfaces (InstanceKlass* this_k, TRAPS);
|
||||
static void eager_initialize_impl (InstanceKlass* this_k);
|
||||
static void set_initialization_state_and_notify_impl (InstanceKlass* this_k, ClassState state, TRAPS);
|
||||
static void call_class_initializer_impl (InstanceKlass* this_k, TRAPS);
|
||||
static Klass* array_klass_impl (InstanceKlass* this_k, bool or_null, int n, TRAPS);
|
||||
static void do_local_static_fields_impl (InstanceKlass* this_k, void f(fieldDescriptor* fd, Handle, TRAPS), Handle, TRAPS);
|
||||
bool link_class_impl (bool throw_verifyerror, TRAPS);
|
||||
bool verify_code (bool throw_verifyerror, TRAPS);
|
||||
void initialize_impl (TRAPS);
|
||||
void initialize_super_interfaces (TRAPS);
|
||||
void eager_initialize_impl ();
|
||||
/* jni_id_for_impl for jfieldID only */
|
||||
static JNIid* jni_id_for_impl (InstanceKlass* this_k, int offset);
|
||||
JNIid* jni_id_for_impl (int offset);
|
||||
|
||||
// Returns the array class for the n'th dimension
|
||||
Klass* array_klass_impl(bool or_null, int n, TRAPS);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue