src/share/vm/oops/methodOop.cpp

changeset 3826
2fe087c3e814
parent 3500
0382d2b469b2
child 3849
eba1d5bce9e8
     1.1 --- a/src/share/vm/oops/methodOop.cpp	Fri Jun 01 15:30:44 2012 -0700
     1.2 +++ b/src/share/vm/oops/methodOop.cpp	Wed Jun 06 14:33:43 2012 -0400
     1.3 @@ -531,9 +531,9 @@
     1.4  
     1.5  
     1.6  bool methodOopDesc::is_klass_loaded_by_klass_index(int klass_index) const {
     1.7 -  if( _constants->tag_at(klass_index).is_unresolved_klass() ) {
     1.8 +  if( constants()->tag_at(klass_index).is_unresolved_klass() ) {
     1.9      Thread *thread = Thread::current();
    1.10 -    Symbol* klass_name = _constants->klass_name_at(klass_index);
    1.11 +    Symbol* klass_name = constants()->klass_name_at(klass_index);
    1.12      Handle loader(thread, instanceKlass::cast(method_holder())->class_loader());
    1.13      Handle prot  (thread, Klass::cast(method_holder())->protection_domain());
    1.14      return SystemDictionary::find(klass_name, loader, prot, thread) != NULL;
    1.15 @@ -544,7 +544,7 @@
    1.16  
    1.17  
    1.18  bool methodOopDesc::is_klass_loaded(int refinfo_index, bool must_be_resolved) const {
    1.19 -  int klass_index = _constants->klass_ref_index_at(refinfo_index);
    1.20 +  int klass_index = constants()->klass_ref_index_at(refinfo_index);
    1.21    if (must_be_resolved) {
    1.22      // Make sure klass is resolved in constantpool.
    1.23      if (constants()->tag_at(klass_index).is_unresolved_klass()) return false;
    1.24 @@ -886,11 +886,13 @@
    1.25  }
    1.26  
    1.27  jint* methodOopDesc::method_type_offsets_chain() {
    1.28 -  static jint pchase[] = { -1, -1, -1 };
    1.29 +  static jint pchase[] = { -1, -1, -1, -1 };
    1.30    if (pchase[0] == -1) {
    1.31 -    jint step0 = in_bytes(constants_offset());
    1.32 -    jint step1 = (constantPoolOopDesc::header_size() + _imcp_method_type_value) * HeapWordSize;
    1.33 +    jint step0 = in_bytes(const_offset());
    1.34 +    jint step1 = in_bytes(constMethodOopDesc::constants_offset());
    1.35 +    jint step2 = (constantPoolOopDesc::header_size() + _imcp_method_type_value) * HeapWordSize;
    1.36      // do this in reverse to avoid races:
    1.37 +    OrderAccess::release_store(&pchase[2], step2);
    1.38      OrderAccess::release_store(&pchase[1], step1);
    1.39      OrderAccess::release_store(&pchase[0], step0);
    1.40    }
    1.41 @@ -1076,9 +1078,7 @@
    1.42    assert(m->constMethod()->is_parsable(), "Should remain parsable");
    1.43  
    1.44    // Reset correct method/const method, method size, and parameter info
    1.45 -  newcm->set_method(newm());
    1.46    newm->set_constMethod(newcm);
    1.47 -  assert(newcm->method() == newm(), "check");
    1.48    newm->constMethod()->set_code_size(new_code_length);
    1.49    newm->constMethod()->set_constMethod_size(new_const_method_size);
    1.50    newm->set_method_size(new_method_size);

mercurial