8005590: java_lang_Class injected field resolved_constructor appears unused
Reviewed-by: coleenp, dholmes
--- a/hotspot/src/share/vm/classfile/javaClasses.cpp Mon Jan 14 21:30:45 2013 +0100
+++ b/hotspot/src/share/vm/classfile/javaClasses.cpp Tue Jan 15 13:32:13 2013 +0100
@@ -687,19 +687,6 @@
}
-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_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 @@
// 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
--- a/hotspot/src/share/vm/classfile/javaClasses.hpp Mon Jan 14 21:30:45 2013 +0100
+++ b/hotspot/src/share/vm/classfile/javaClasses.hpp Tue Jan 15 13:32:13 2013 +0100
@@ -206,7 +206,6 @@
#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 @@
// 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 @@
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);
--- a/hotspot/src/share/vm/classfile/vmSymbols.hpp Mon Jan 14 21:30:45 2013 +0100
+++ b/hotspot/src/share/vm/classfile/vmSymbols.hpp Tue Jan 15 13:32:13 2013 +0100
@@ -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") \
--- a/hotspot/src/share/vm/oops/instanceKlass.cpp Mon Jan 14 21:30:45 2013 +0100
+++ b/hotspot/src/share/vm/oops/instanceKlass.cpp Tue Jan 15 13:32:13 2013 +0100
@@ -2890,11 +2890,7 @@
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();
--- a/hotspot/src/share/vm/runtime/vmStructs.cpp Mon Jan 14 21:30:45 2013 +0100
+++ b/hotspot/src/share/vm/runtime/vmStructs.cpp Tue Jan 15 13:32:13 2013 +0100
@@ -1200,7 +1200,6 @@
/*********************************/ \
\
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) \