hotspot/src/share/vm/oops/cpCache.cpp
changeset 35900 d64cf9290fc4
parent 33611 9abd65805e19
child 35913 928548a43408
equal deleted inserted replaced
35899:0dbc821628fc 35900:d64cf9290fc4
     1 /*
     1 /*
     2  * Copyright (c) 1998, 2015, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 1998, 2016, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
   392         return m;
   392         return m;
   393       } else {
   393       } else {
   394         int holder_index = cpool->uncached_klass_ref_index_at(constant_pool_index());
   394         int holder_index = cpool->uncached_klass_ref_index_at(constant_pool_index());
   395         if (cpool->tag_at(holder_index).is_klass()) {
   395         if (cpool->tag_at(holder_index).is_klass()) {
   396           Klass* klass = cpool->resolved_klass_at(holder_index);
   396           Klass* klass = cpool->resolved_klass_at(holder_index);
   397           if (!klass->is_instance_klass())
   397           return klass->method_at_vtable(f2_as_index());
   398             klass = SystemDictionary::Object_klass();
       
   399           return InstanceKlass::cast(klass)->method_at_vtable(f2_as_index());
       
   400         }
   398         }
   401       }
   399       }
   402       break;
   400       break;
   403     }
   401     }
   404   }
   402   }