Mercurial > hg > truffle
comparison src/share/vm/interpreter/linkResolver.cpp @ 12890:8f4bb1773fd9
Merge
author | iveresov |
---|---|
date | Thu, 17 Oct 2013 10:58:45 -0700 |
parents | 2f8728d92483 8df6f123d35e |
children | ee99e1a7c5fb |
comparison
equal
deleted
inserted
replaced
12860:e8703d708e6e | 12890:8f4bb1773fd9 |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. | |
2 * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. | 3 * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | 4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * | 5 * |
5 * This code is free software; you can redistribute it and/or modify it | 6 * 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 | 7 * under the terms of the GNU General Public License version 2 only, as |
155 // A miranda method. Compute the vtable index. | 156 // A miranda method. Compute the vtable index. |
156 ResourceMark rm; | 157 ResourceMark rm; |
157 klassVtable* vt = InstanceKlass::cast(resolved_klass)->vtable(); | 158 klassVtable* vt = InstanceKlass::cast(resolved_klass)->vtable(); |
158 index = vt->index_of_miranda(resolved_method->name(), | 159 index = vt->index_of_miranda(resolved_method->name(), |
159 resolved_method->signature()); | 160 resolved_method->signature()); |
161 kind = CallInfo::vtable_call; | |
162 } else if (resolved_method->has_vtable_index()) { | |
163 // Can occur if an interface redeclares a method of Object. | |
164 | |
165 #ifdef ASSERT | |
166 // Ensure that this is really the case. | |
167 KlassHandle object_klass = SystemDictionary::Object_klass(); | |
168 Method * object_resolved_method = object_klass()->vtable()->method_at(index); | |
169 assert(object_resolved_method->name() == resolved_method->name(), | |
170 err_msg("Object and interface method names should match at vtable index %d, %s != %s", | |
171 index, object_resolved_method->name()->as_C_string(), resolved_method->name()->as_C_string())); | |
172 assert(object_resolved_method->signature() == resolved_method->signature(), | |
173 err_msg("Object and interface method signatures should match at vtable index %d, %s != %s", | |
174 index, object_resolved_method->signature()->as_C_string(), resolved_method->signature()->as_C_string())); | |
175 #endif // ASSERT | |
176 | |
160 kind = CallInfo::vtable_call; | 177 kind = CallInfo::vtable_call; |
161 } else { | 178 } else { |
162 // A regular interface call. | 179 // A regular interface call. |
163 kind = CallInfo::itable_call; | 180 kind = CallInfo::itable_call; |
164 index = resolved_method->itable_index(); | 181 index = resolved_method->itable_index(); |