hotspot/src/share/vm/oops/cpCacheOop.cpp
changeset 5420 586d3988e72b
parent 4429 d7eb4e2099aa
child 5547 f4b087cbb361
equal deleted inserted replaced
5419:f2e8cc8c12ea 5420:586d3988e72b
   216   set_flags(as_flags(as_TosState(method->result_type()), method->is_final_method(), false, false, false, true) | method()->size_of_parameters());
   216   set_flags(as_flags(as_TosState(method->result_type()), method->is_final_method(), false, false, false, true) | method()->size_of_parameters());
   217   set_bytecode_1(Bytecodes::_invokeinterface);
   217   set_bytecode_1(Bytecodes::_invokeinterface);
   218 }
   218 }
   219 
   219 
   220 
   220 
   221 void ConstantPoolCacheEntry::set_dynamic_call(Handle call_site, int extra_data) {
   221 void ConstantPoolCacheEntry::set_dynamic_call(Handle call_site,
   222   methodOop method = (methodOop) java_dyn_CallSite::vmmethod(call_site());
   222                                               methodHandle signature_invoker) {
   223   assert(method->is_method(), "must be initialized properly");
   223   int param_size = signature_invoker->size_of_parameters();
   224   int param_size = method->size_of_parameters();
       
   225   assert(param_size >= 1, "method argument size must include MH.this");
   224   assert(param_size >= 1, "method argument size must include MH.this");
   226   param_size -= 1;              // do not count MH.this; it is not stacked for invokedynamic
   225   param_size -= 1;              // do not count MH.this; it is not stacked for invokedynamic
   227   if (Atomic::cmpxchg_ptr(call_site(), &_f1, NULL) == NULL) {
   226   if (Atomic::cmpxchg_ptr(call_site(), &_f1, NULL) == NULL) {
   228     // racing threads might be trying to install their own favorites
   227     // racing threads might be trying to install their own favorites
   229     set_f1(call_site());
   228     set_f1(call_site());
   230   }
   229   }
   231   set_f2(extra_data);
   230   //set_f2(0);
   232   set_flags(as_flags(as_TosState(method->result_type()), method->is_final_method(), false, false, false, true) | param_size);
   231   bool is_final = true;
       
   232   assert(signature_invoker->is_final_method(), "is_final");
       
   233   set_flags(as_flags(as_TosState(signature_invoker->result_type()), is_final, false, false, false, true) | param_size);
   233   // do not do set_bytecode on a secondary CP cache entry
   234   // do not do set_bytecode on a secondary CP cache entry
   234   //set_bytecode_1(Bytecodes::_invokedynamic);
   235   //set_bytecode_1(Bytecodes::_invokedynamic);
   235 }
   236 }
   236 
   237 
   237 
   238