Print this page


Split Close
Expand all
Collapse all
          --- old/src/share/vm/ci/ciMethod.cpp
          +++ new/src/share/vm/ci/ciMethod.cpp
↓ open down ↓ 140 lines elided ↑ open up ↑
 141  141    if (_interpreter_invocation_count == 0)
 142  142      _interpreter_invocation_count = 1;
 143  143  }
 144  144  
 145  145  
 146  146  // ------------------------------------------------------------------
 147  147  // ciMethod::ciMethod
 148  148  //
 149  149  // Unloaded method.
 150  150  ciMethod::ciMethod(ciInstanceKlass* holder,
 151      -                   ciSymbol* name,
 152      -                   ciSymbol* signature) : ciObject(ciMethodKlass::make()) {
 153      -  // These fields are always filled in.
 154      -  _name = name;
 155      -  _holder = holder;
 156      -  _signature = new (CURRENT_ENV->arena()) ciSignature(_holder, constantPoolHandle(), signature);
 157      -  _intrinsic_id = vmIntrinsics::_none;
 158      -  _liveness = NULL;
 159      -  _can_be_statically_bound = false;
 160      -  _method_blocks = NULL;
 161      -  _method_data = NULL;
      151 +                   ciSymbol*        name,
      152 +                   ciSymbol*        signature,
      153 +                   ciInstanceKlass* accessor) :
      154 +  ciObject(ciMethodKlass::make()),
      155 +  _name(                   name),
      156 +  _holder(                 holder),
      157 +  _intrinsic_id(           vmIntrinsics::_none),
      158 +  _liveness(               NULL),
      159 +  _can_be_statically_bound(false),
      160 +  _method_blocks(          NULL),
      161 +  _method_data(            NULL)
 162  162  #if defined(COMPILER2) || defined(SHARK)
 163      -  _flow = NULL;
 164      -  _bcea = NULL;
      163 +  ,
      164 +  _flow(                   NULL),
      165 +  _bcea(                   NULL)
 165  166  #endif // COMPILER2 || SHARK
      167 +{
      168 +  // Usually holder and accessor are the same type but in some cases
      169 +  // the holder has the wrong class loader (e.g. invokedynamic call
      170 +  // sites) so we pass the accessor.
      171 +  _signature = new (CURRENT_ENV->arena()) ciSignature(accessor, constantPoolHandle(), signature);
 166  172  }
 167  173  
 168  174  
 169  175  // ------------------------------------------------------------------
 170  176  // ciMethod::load_code
 171  177  //
 172  178  // Load the bytecodes and exception handler table for this method.
 173  179  void ciMethod::load_code() {
 174  180    VM_ENTRY_MARK;
 175  181    assert(is_loaded(), "only loaded methods have code");
↓ open down ↓ 1052 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX