Mercurial > hg > graal-jvmci-8
comparison src/share/vm/oops/klassVtable.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 | 18fb7da42534 |
children | 8d9fc28831cc |
comparison
equal
deleted
inserted
replaced
6981:8c413497f434 | 6983:070d523b96a7 |
---|---|
744 // This is same code as in Linkresolver::lookup_instance_method_in_klasses | 744 // This is same code as in Linkresolver::lookup_instance_method_in_klasses |
745 Method* target = klass->uncached_lookup_method(method_name, method_signature); | 745 Method* target = klass->uncached_lookup_method(method_name, method_signature); |
746 while (target != NULL && target->is_static()) { | 746 while (target != NULL && target->is_static()) { |
747 // continue with recursive lookup through the superclass | 747 // continue with recursive lookup through the superclass |
748 Klass* super = target->method_holder()->super(); | 748 Klass* super = target->method_holder()->super(); |
749 target = (super == NULL) ? (Method*)NULL : Klass::cast(super)->uncached_lookup_method(method_name, method_signature); | 749 target = (super == NULL) ? (Method*)NULL : super->uncached_lookup_method(method_name, method_signature); |
750 } | 750 } |
751 if (target == NULL || !target->is_public() || target->is_abstract()) { | 751 if (target == NULL || !target->is_public() || target->is_abstract()) { |
752 // Entry do not resolve. Leave it empty | 752 // Entry do not resolve. Leave it empty |
753 } else { | 753 } else { |
754 // Entry did resolve, check loader constraints before initializing | 754 // Entry did resolve, check loader constraints before initializing |
850 // Visit all interfaces with at-least one method (excluding <clinit>) | 850 // Visit all interfaces with at-least one method (excluding <clinit>) |
851 void visit_all_interfaces(Array<Klass*>* transitive_intf, InterfaceVisiterClosure *blk) { | 851 void visit_all_interfaces(Array<Klass*>* transitive_intf, InterfaceVisiterClosure *blk) { |
852 // Handle array argument | 852 // Handle array argument |
853 for(int i = 0; i < transitive_intf->length(); i++) { | 853 for(int i = 0; i < transitive_intf->length(); i++) { |
854 Klass* intf = transitive_intf->at(i); | 854 Klass* intf = transitive_intf->at(i); |
855 assert(Klass::cast(intf)->is_interface(), "sanity check"); | 855 assert(intf->is_interface(), "sanity check"); |
856 | 856 |
857 // Find no. of methods excluding a <clinit> | 857 // Find no. of methods excluding a <clinit> |
858 int method_count = InstanceKlass::cast(intf)->methods()->length(); | 858 int method_count = InstanceKlass::cast(intf)->methods()->length(); |
859 if (method_count > 0) { | 859 if (method_count > 0) { |
860 Method* m = InstanceKlass::cast(intf)->methods()->at(0); | 860 Method* m = InstanceKlass::cast(intf)->methods()->at(0); |