src/share/vm/oops/cpCache.cpp

changeset 4256
a4e1bd941ded
parent 4251
18fb7da42534
parent 4253
64672b22ef05
child 4280
80e866b1d053
     1.1 --- a/src/share/vm/oops/cpCache.cpp	Wed Nov 07 16:09:20 2012 -0800
     1.2 +++ b/src/share/vm/oops/cpCache.cpp	Thu Nov 08 22:39:08 2012 +0100
     1.3 @@ -243,25 +243,17 @@
     1.4  }
     1.5  
     1.6  
     1.7 -void ConstantPoolCacheEntry::set_method_handle(constantPoolHandle cpool,
     1.8 -                                               methodHandle adapter,
     1.9 -                                               Handle appendix, Handle method_type,
    1.10 -                                               objArrayHandle resolved_references) {
    1.11 -  set_method_handle_common(cpool, Bytecodes::_invokehandle, adapter, appendix, method_type, resolved_references);
    1.12 +void ConstantPoolCacheEntry::set_method_handle(constantPoolHandle cpool, const CallInfo &call_info) {
    1.13 +  set_method_handle_common(cpool, Bytecodes::_invokehandle, call_info);
    1.14  }
    1.15  
    1.16 -void ConstantPoolCacheEntry::set_dynamic_call(constantPoolHandle cpool,
    1.17 -                                              methodHandle adapter,
    1.18 -                                              Handle appendix, Handle method_type,
    1.19 -                                              objArrayHandle resolved_references) {
    1.20 -  set_method_handle_common(cpool, Bytecodes::_invokedynamic, adapter, appendix, method_type, resolved_references);
    1.21 +void ConstantPoolCacheEntry::set_dynamic_call(constantPoolHandle cpool, const CallInfo &call_info) {
    1.22 +  set_method_handle_common(cpool, Bytecodes::_invokedynamic, call_info);
    1.23  }
    1.24  
    1.25  void ConstantPoolCacheEntry::set_method_handle_common(constantPoolHandle cpool,
    1.26                                                        Bytecodes::Code invoke_code,
    1.27 -                                                      methodHandle adapter,
    1.28 -                                                      Handle appendix, Handle method_type,
    1.29 -                                                      objArrayHandle resolved_references) {
    1.30 +                                                      const CallInfo &call_info) {
    1.31    // NOTE: This CPCE can be the subject of data races.
    1.32    // There are three words to update: flags, refs[f2], f1 (in that order).
    1.33    // Writers must store all other values before f1.
    1.34 @@ -276,6 +268,9 @@
    1.35      return;
    1.36    }
    1.37  
    1.38 +  const methodHandle adapter = call_info.resolved_method();
    1.39 +  const Handle appendix      = call_info.resolved_appendix();
    1.40 +  const Handle method_type   = call_info.resolved_method_type();
    1.41    const bool has_appendix    = appendix.not_null();
    1.42    const bool has_method_type = method_type.not_null();
    1.43  
    1.44 @@ -315,6 +310,7 @@
    1.45    // This allows us to create fewer method oops, while keeping type safety.
    1.46    //
    1.47  
    1.48 +  objArrayHandle resolved_references = cpool->resolved_references();
    1.49    // Store appendix, if any.
    1.50    if (has_appendix) {
    1.51      const int appendix_index = f2_as_index() + _indy_resolved_references_appendix_offset;

mercurial