Mercurial > hg > graal-jvmci-8
comparison src/share/vm/classfile/placeholders.cpp @ 6983:070d523b96a7
8001471: Klass::cast() does nothing
Summary: Remove function Klass::cast() and calls to it.
Reviewed-by: dholmes, coleenp
author | hseigel |
---|---|
date | Mon, 12 Nov 2012 16:15:05 -0500 |
parents | da91efe96a93 |
children | aefb345d3f5e |
comparison
equal
deleted
inserted
replaced
6981:8c413497f434 | 6983:070d523b96a7 |
---|---|
43 entry->set_supername(supername); | 43 entry->set_supername(supername); |
44 entry->set_superThreadQ(NULL); | 44 entry->set_superThreadQ(NULL); |
45 entry->set_loadInstanceThreadQ(NULL); | 45 entry->set_loadInstanceThreadQ(NULL); |
46 entry->set_defineThreadQ(NULL); | 46 entry->set_defineThreadQ(NULL); |
47 entry->set_definer(NULL); | 47 entry->set_definer(NULL); |
48 entry->set_instanceKlass(NULL); | 48 entry->set_instance_klass(NULL); |
49 return entry; | 49 return entry; |
50 } | 50 } |
51 | 51 |
52 void PlaceholderTable::free_entry(PlaceholderEntry* entry) { | 52 void PlaceholderTable::free_entry(PlaceholderEntry* entry) { |
53 // decrement Symbol refcount here because Hashtable doesn't. | 53 // decrement Symbol refcount here because Hashtable doesn't. |
186 | 186 |
187 | 187 |
188 void PlaceholderEntry::classes_do(KlassClosure* closure) { | 188 void PlaceholderEntry::classes_do(KlassClosure* closure) { |
189 assert(klassname() != NULL, "should have a non-null klass"); | 189 assert(klassname() != NULL, "should have a non-null klass"); |
190 if (_instanceKlass != NULL) { | 190 if (_instanceKlass != NULL) { |
191 closure->do_klass(InstanceKlass()); | 191 closure->do_klass(instance_klass()); |
192 } | 192 } |
193 } | 193 } |
194 | 194 |
195 // do all entries in the placeholder table | 195 // do all entries in the placeholder table |
196 void PlaceholderTable::entries_do(void f(Symbol*)) { | 196 void PlaceholderTable::entries_do(void f(Symbol*)) { |
218 } | 218 } |
219 if (definer() != NULL) { | 219 if (definer() != NULL) { |
220 tty->print(", definer "); | 220 tty->print(", definer "); |
221 definer()->print_value(); | 221 definer()->print_value(); |
222 } | 222 } |
223 if (InstanceKlass() != NULL) { | 223 if (instance_klass() != NULL) { |
224 tty->print(", InstanceKlass "); | 224 tty->print(", InstanceKlass "); |
225 InstanceKlass()->print_value(); | 225 instance_klass()->print_value(); |
226 } | 226 } |
227 tty->print("\n"); | 227 tty->print("\n"); |
228 tty->print("loadInstanceThreadQ threads:"); | 228 tty->print("loadInstanceThreadQ threads:"); |
229 loadInstanceThreadQ()->printActionQ(); | 229 loadInstanceThreadQ()->printActionQ(); |
230 tty->print("\n"); | 230 tty->print("\n"); |
239 | 239 |
240 void PlaceholderEntry::verify() const { | 240 void PlaceholderEntry::verify() const { |
241 guarantee(loader_data() != NULL, "Must have been setup."); | 241 guarantee(loader_data() != NULL, "Must have been setup."); |
242 guarantee(loader_data()->class_loader() == NULL || loader_data()->class_loader()->is_instance(), | 242 guarantee(loader_data()->class_loader() == NULL || loader_data()->class_loader()->is_instance(), |
243 "checking type of _loader"); | 243 "checking type of _loader"); |
244 guarantee(InstanceKlass() == NULL | 244 guarantee(instance_klass() == NULL |
245 || Klass::cast(InstanceKlass())->oop_is_instance(), | 245 || instance_klass()->oop_is_instance(), |
246 "checking type of InstanceKlass result"); | 246 "checking type of instance_klass result"); |
247 } | 247 } |
248 | 248 |
249 void PlaceholderTable::verify() { | 249 void PlaceholderTable::verify() { |
250 int element_count = 0; | 250 int element_count = 0; |
251 for (int pindex = 0; pindex < table_size(); pindex++) { | 251 for (int pindex = 0; pindex < table_size(); pindex++) { |