8005590: java_lang_Class injected field resolved_constructor appears unused
Reviewed-by: coleenp, dholmes
This commit is contained in:
parent
33b7cd7cae
commit
67fc68ea7f
@ -687,19 +687,6 @@ void java_lang_Class::set_array_klass(oop java_class, Klass* klass) {
|
||||
}
|
||||
|
||||
|
||||
Method* java_lang_Class::resolved_constructor(oop java_class) {
|
||||
Metadata* constructor = java_class->metadata_field(_resolved_constructor_offset);
|
||||
assert(constructor == NULL || constructor->is_method(), "should be method");
|
||||
return ((Method*)constructor);
|
||||
}
|
||||
|
||||
|
||||
void java_lang_Class::set_resolved_constructor(oop java_class, Method* constructor) {
|
||||
assert(constructor->is_method(), "should be method");
|
||||
java_class->metadata_field_put(_resolved_constructor_offset, constructor);
|
||||
}
|
||||
|
||||
|
||||
bool java_lang_Class::is_primitive(oop java_class) {
|
||||
// should assert:
|
||||
//assert(java_lang_Class::is_instance(java_class), "must be a Class object");
|
||||
@ -2949,7 +2936,6 @@ int java_lang_System::err_offset_in_bytes() {
|
||||
|
||||
int java_lang_Class::_klass_offset;
|
||||
int java_lang_Class::_array_klass_offset;
|
||||
int java_lang_Class::_resolved_constructor_offset;
|
||||
int java_lang_Class::_oop_size_offset;
|
||||
int java_lang_Class::_static_oop_field_count_offset;
|
||||
GrowableArray<Klass*>* java_lang_Class::_fixup_mirror_list = NULL;
|
||||
@ -3303,7 +3289,6 @@ void JavaClasses::check_offsets() {
|
||||
// Fake fields
|
||||
// CHECK_OFFSET("java/lang/Class", java_lang_Class, klass); // %%% this needs to be checked
|
||||
// CHECK_OFFSET("java/lang/Class", java_lang_Class, array_klass); // %%% this needs to be checked
|
||||
// CHECK_OFFSET("java/lang/Class", java_lang_Class, resolved_constructor); // %%% this needs to be checked
|
||||
|
||||
// java.lang.Throwable
|
||||
|
||||
|
@ -206,7 +206,6 @@ class java_lang_String : AllStatic {
|
||||
|
||||
#define CLASS_INJECTED_FIELDS(macro) \
|
||||
macro(java_lang_Class, klass, intptr_signature, false) \
|
||||
macro(java_lang_Class, resolved_constructor, intptr_signature, false) \
|
||||
macro(java_lang_Class, array_klass, intptr_signature, false) \
|
||||
macro(java_lang_Class, oop_size, int_signature, false) \
|
||||
macro(java_lang_Class, static_oop_field_count, int_signature, false)
|
||||
@ -218,7 +217,6 @@ class java_lang_Class : AllStatic {
|
||||
// The fake offsets are added by the class loader when java.lang.Class is loaded
|
||||
|
||||
static int _klass_offset;
|
||||
static int _resolved_constructor_offset;
|
||||
static int _array_klass_offset;
|
||||
|
||||
static int _oop_size_offset;
|
||||
@ -254,15 +252,11 @@ class java_lang_Class : AllStatic {
|
||||
static bool is_primitive(oop java_class);
|
||||
static BasicType primitive_type(oop java_class);
|
||||
static oop primitive_mirror(BasicType t);
|
||||
// JVM_NewInstance support
|
||||
static Method* resolved_constructor(oop java_class);
|
||||
static void set_resolved_constructor(oop java_class, Method* constructor);
|
||||
// JVM_NewArray support
|
||||
static Klass* array_klass(oop java_class);
|
||||
static void set_array_klass(oop java_class, Klass* klass);
|
||||
// compiler support for class operations
|
||||
static int klass_offset_in_bytes() { return _klass_offset; }
|
||||
static int resolved_constructor_offset_in_bytes() { return _resolved_constructor_offset; }
|
||||
static int array_klass_offset_in_bytes() { return _array_klass_offset; }
|
||||
// Support for classRedefinedCount field
|
||||
static int classRedefinedCount(oop the_class_mirror);
|
||||
|
@ -383,7 +383,6 @@
|
||||
template(basicType_name, "basicType") \
|
||||
template(append_name, "append") \
|
||||
template(klass_name, "klass") \
|
||||
template(resolved_constructor_name, "resolved_constructor") \
|
||||
template(array_klass_name, "array_klass") \
|
||||
template(oop_size_name, "oop_size") \
|
||||
template(static_oop_field_count_name, "static_oop_field_count") \
|
||||
|
@ -2890,11 +2890,7 @@ void InstanceKlass::oop_print_on(oop obj, outputStream* st) {
|
||||
st->print(BULLET"fake entry for mirror: ");
|
||||
mirrored_klass->print_value_on_maybe_null(st);
|
||||
st->cr();
|
||||
st->print(BULLET"fake entry resolved_constructor: ");
|
||||
Method* ctor = java_lang_Class::resolved_constructor(obj);
|
||||
ctor->print_value_on_maybe_null(st);
|
||||
Klass* array_klass = java_lang_Class::array_klass(obj);
|
||||
st->cr();
|
||||
st->print(BULLET"fake entry for array: ");
|
||||
array_klass->print_value_on_maybe_null(st);
|
||||
st->cr();
|
||||
|
@ -1200,7 +1200,6 @@ typedef BinaryTreeDictionary<Metablock, FreeList> MetablockTreeDictionary;
|
||||
/*********************************/ \
|
||||
\
|
||||
static_field(java_lang_Class, _klass_offset, int) \
|
||||
static_field(java_lang_Class, _resolved_constructor_offset, int) \
|
||||
static_field(java_lang_Class, _array_klass_offset, int) \
|
||||
static_field(java_lang_Class, _oop_size_offset, int) \
|
||||
static_field(java_lang_Class, _static_oop_field_count_offset, int) \
|
||||
|
Loading…
x
Reference in New Issue
Block a user