170 bool is_vtable_call = (vtable_index >= 0); // FIXME: split this method on this boolean
171 assert(method->interpreter_entry() != NULL, "should have been set at this point");
172 assert(!method->is_obsolete(), "attempt to write obsolete method to cpCache");
173
174 int byte_no = -1;
175 bool change_to_virtual = false;
176
177 switch (invoke_code) {
178 case Bytecodes::_invokeinterface:
179 if (vtable_index == Method::nonvirtual_vtable_index) {
180 // Should be a private interface method invocation
181 assert(method->is_private(), "unexpected non-private method");
182 assert(method->can_be_statically_bound(), "unexpected non-statically-bound method");
183 // set_f2_as_vfinal_method checks if is_vfinal flag is true.
184 set_method_flags(as_TosState(method->result_type()),
185 ( 1 << is_vfinal_shift) |
186 ((method->is_final_method() ? 1 : 0) << is_final_shift),
187 method()->size_of_parameters());
188 set_f2_as_vfinal_method(method());
189 byte_no = 2;
190 break;
191 }
192 else {
193 // We get here from InterpreterRuntime::resolve_invoke when an invokeinterface
194 // instruction somehow links to a non-interface method (in Object).
195 // In that case, the method has no itable index and must be invoked as a virtual.
196 // Set a flag to keep track of this corner case.
197 assert(method->is_public(), "Calling non-public method in Object with invokeinterface");
198 change_to_virtual = true;
199
200 // ...and fall through as if we were handling invokevirtual:
201 }
202 case Bytecodes::_invokevirtual:
203 {
204 if (!is_vtable_call) {
205 assert(method->can_be_statically_bound(), "");
206 // set_f2_as_vfinal_method checks if is_vfinal flag is true.
207 set_method_flags(as_TosState(method->result_type()),
208 ( 1 << is_vfinal_shift) |
209 ((method->is_final_method() ? 1 : 0) << is_final_shift) |
|
170 bool is_vtable_call = (vtable_index >= 0); // FIXME: split this method on this boolean
171 assert(method->interpreter_entry() != NULL, "should have been set at this point");
172 assert(!method->is_obsolete(), "attempt to write obsolete method to cpCache");
173
174 int byte_no = -1;
175 bool change_to_virtual = false;
176
177 switch (invoke_code) {
178 case Bytecodes::_invokeinterface:
179 if (vtable_index == Method::nonvirtual_vtable_index) {
180 // Should be a private interface method invocation
181 assert(method->is_private(), "unexpected non-private method");
182 assert(method->can_be_statically_bound(), "unexpected non-statically-bound method");
183 // set_f2_as_vfinal_method checks if is_vfinal flag is true.
184 set_method_flags(as_TosState(method->result_type()),
185 ( 1 << is_vfinal_shift) |
186 ((method->is_final_method() ? 1 : 0) << is_final_shift),
187 method()->size_of_parameters());
188 set_f2_as_vfinal_method(method());
189 byte_no = 2;
190 set_f1(method->method_holder()); // interface klass*
191 break;
192 }
193 else {
194 // We get here from InterpreterRuntime::resolve_invoke when an invokeinterface
195 // instruction somehow links to a non-interface method (in Object).
196 // In that case, the method has no itable index and must be invoked as a virtual.
197 // Set a flag to keep track of this corner case.
198 assert(method->is_public(), "Calling non-public method in Object with invokeinterface");
199 change_to_virtual = true;
200
201 // ...and fall through as if we were handling invokevirtual:
202 }
203 case Bytecodes::_invokevirtual:
204 {
205 if (!is_vtable_call) {
206 assert(method->can_be_statically_bound(), "");
207 // set_f2_as_vfinal_method checks if is_vfinal flag is true.
208 set_method_flags(as_TosState(method->result_type()),
209 ( 1 << is_vfinal_shift) |
210 ((method->is_final_method() ? 1 : 0) << is_final_shift) |
|