151
152 void Klass::initialize(TRAPS) {
153 ShouldNotReachHere();
154 }
155
156 bool Klass::compute_is_subtype_of(Klass* k) {
157 assert(k->is_klass(), "argument must be a class");
158 return is_subclass_of(k);
159 }
160
161 Klass* Klass::find_field(Symbol* name, Symbol* sig, fieldDescriptor* fd) const {
162 #ifdef ASSERT
163 tty->print_cr("Error: find_field called on a klass oop."
164 " Likely error: reflection method does not correctly"
165 " wrap return value in a mirror object.");
166 #endif
167 ShouldNotReachHere();
168 return NULL;
169 }
170
171 Method* Klass::uncached_lookup_method(const Symbol* name, const Symbol* signature, OverpassLookupMode overpass_mode) const {
172 #ifdef ASSERT
173 tty->print_cr("Error: uncached_lookup_method called on a klass oop."
174 " Likely error: reflection method does not correctly"
175 " wrap return value in a mirror object.");
176 #endif
177 ShouldNotReachHere();
178 return NULL;
179 }
180
181 void* Klass::operator new(size_t size, ClassLoaderData* loader_data, size_t word_size, TRAPS) throw() {
182 return Metaspace::allocate(loader_data, word_size, MetaspaceObj::ClassType, THREAD);
183 }
184
185 // "Normal" instantiation is preceeded by a MetaspaceObj allocation
186 // which zeros out memory - calloc equivalent.
187 // The constructor is also used from CppVtableCloner,
188 // which doesn't zero out the memory before calling the constructor.
189 // Need to set the _java_mirror field explicitly to not hit an assert that the field
190 // should be NULL before setting it.
191 Klass::Klass() : _prototype_header(markOopDesc::prototype()),
|
151
152 void Klass::initialize(TRAPS) {
153 ShouldNotReachHere();
154 }
155
156 bool Klass::compute_is_subtype_of(Klass* k) {
157 assert(k->is_klass(), "argument must be a class");
158 return is_subclass_of(k);
159 }
160
161 Klass* Klass::find_field(Symbol* name, Symbol* sig, fieldDescriptor* fd) const {
162 #ifdef ASSERT
163 tty->print_cr("Error: find_field called on a klass oop."
164 " Likely error: reflection method does not correctly"
165 " wrap return value in a mirror object.");
166 #endif
167 ShouldNotReachHere();
168 return NULL;
169 }
170
171 Method* Klass::uncached_lookup_method(const Symbol* name, const Symbol* signature,
172 OverpassLookupMode overpass_mode,
173 PrivateLookupMode private_mode) const {
174 #ifdef ASSERT
175 tty->print_cr("Error: uncached_lookup_method called on a klass oop."
176 " Likely error: reflection method does not correctly"
177 " wrap return value in a mirror object.");
178 #endif
179 ShouldNotReachHere();
180 return NULL;
181 }
182
183 void* Klass::operator new(size_t size, ClassLoaderData* loader_data, size_t word_size, TRAPS) throw() {
184 return Metaspace::allocate(loader_data, word_size, MetaspaceObj::ClassType, THREAD);
185 }
186
187 // "Normal" instantiation is preceeded by a MetaspaceObj allocation
188 // which zeros out memory - calloc equivalent.
189 // The constructor is also used from CppVtableCloner,
190 // which doesn't zero out the memory before calling the constructor.
191 // Need to set the _java_mirror field explicitly to not hit an assert that the field
192 // should be NULL before setting it.
193 Klass::Klass() : _prototype_header(markOopDesc::prototype()),
|