hotspot/src/share/vm/oops/cpCache.cpp
changeset 46727 6e4a84748e2c
parent 46630 75aa3e39d02c
child 46746 ea379ebb9447
equal deleted inserted replaced
46726:7801367e3cc9 46727:6e4a84748e2c
   137   guarantee(parameter_size() == value,
   137   guarantee(parameter_size() == value,
   138             "size must not change: parameter_size=%d, value=%d", parameter_size(), value);
   138             "size must not change: parameter_size=%d, value=%d", parameter_size(), value);
   139 }
   139 }
   140 
   140 
   141 void ConstantPoolCacheEntry::set_direct_or_vtable_call(Bytecodes::Code invoke_code,
   141 void ConstantPoolCacheEntry::set_direct_or_vtable_call(Bytecodes::Code invoke_code,
   142                                                        methodHandle method,
   142                                                        const methodHandle& method,
   143                                                        int vtable_index,
   143                                                        int vtable_index,
   144                                                        bool sender_is_interface) {
   144                                                        bool sender_is_interface) {
   145   bool is_vtable_call = (vtable_index >= 0);  // FIXME: split this method on this boolean
   145   bool is_vtable_call = (vtable_index >= 0);  // FIXME: split this method on this boolean
   146   assert(method->interpreter_entry() != NULL, "should have been set at this point");
   146   assert(method->interpreter_entry() != NULL, "should have been set at this point");
   147   assert(!method->is_obsolete(),  "attempt to write obsolete method to cpCache");
   147   assert(!method->is_obsolete(),  "attempt to write obsolete method to cpCache");
   239     ShouldNotReachHere();
   239     ShouldNotReachHere();
   240   }
   240   }
   241   NOT_PRODUCT(verify(tty));
   241   NOT_PRODUCT(verify(tty));
   242 }
   242 }
   243 
   243 
   244 void ConstantPoolCacheEntry::set_direct_call(Bytecodes::Code invoke_code, methodHandle method,
   244 void ConstantPoolCacheEntry::set_direct_call(Bytecodes::Code invoke_code, const methodHandle& method,
   245                                              bool sender_is_interface) {
   245                                              bool sender_is_interface) {
   246   int index = Method::nonvirtual_vtable_index;
   246   int index = Method::nonvirtual_vtable_index;
   247   // index < 0; FIXME: inline and customize set_direct_or_vtable_call
   247   // index < 0; FIXME: inline and customize set_direct_or_vtable_call
   248   set_direct_or_vtable_call(invoke_code, method, index, sender_is_interface);
   248   set_direct_or_vtable_call(invoke_code, method, index, sender_is_interface);
   249 }
   249 }
   250 
   250 
   251 void ConstantPoolCacheEntry::set_vtable_call(Bytecodes::Code invoke_code, methodHandle method, int index) {
   251 void ConstantPoolCacheEntry::set_vtable_call(Bytecodes::Code invoke_code, const methodHandle& method, int index) {
   252   // either the method is a miranda or its holder should accept the given index
   252   // either the method is a miranda or its holder should accept the given index
   253   assert(method->method_holder()->is_interface() || method->method_holder()->verify_vtable_index(index), "");
   253   assert(method->method_holder()->is_interface() || method->method_holder()->verify_vtable_index(index), "");
   254   // index >= 0; FIXME: inline and customize set_direct_or_vtable_call
   254   // index >= 0; FIXME: inline and customize set_direct_or_vtable_call
   255   set_direct_or_vtable_call(invoke_code, method, index, false);
   255   set_direct_or_vtable_call(invoke_code, method, index, false);
   256 }
   256 }