src/share/vm/classfile/classFileParser.cpp

changeset 1408
ad6585fd4087
parent 1314
494244ae0171
child 1409
26b774d693aa
     1.1 --- a/src/share/vm/classfile/classFileParser.cpp	Tue Sep 01 23:34:08 2009 -0700
     1.2 +++ b/src/share/vm/classfile/classFileParser.cpp	Fri Sep 04 12:53:02 2009 -0400
     1.3 @@ -2547,6 +2547,7 @@
     1.4                                                      KlassHandle host_klass,
     1.5                                                      GrowableArray<Handle>* cp_patches,
     1.6                                                      symbolHandle& parsed_name,
     1.7 +                                                    bool verify,
     1.8                                                      TRAPS) {
     1.9    // So that JVMTI can cache class file in the state before retransformable agents
    1.10    // have modified it
    1.11 @@ -2591,7 +2592,7 @@
    1.12    instanceKlassHandle nullHandle;
    1.13  
    1.14    // Figure out whether we can skip format checking (matching classic VM behavior)
    1.15 -  _need_verify = Verifier::should_verify_for(class_loader());
    1.16 +  _need_verify = Verifier::should_verify_for(class_loader(), verify);
    1.17  
    1.18    // Set the verify flag in stream
    1.19    cfs->set_verify(_need_verify);
    1.20 @@ -3205,6 +3206,9 @@
    1.21  
    1.22      // Fill in information already parsed
    1.23      this_klass->set_access_flags(access_flags);
    1.24 +    if (verify) {
    1.25 +      this_klass->set_should_verify_class();
    1.26 +    }
    1.27      jint lh = Klass::instance_layout_helper(instance_size, false);
    1.28      this_klass->set_layout_helper(lh);
    1.29      assert(this_klass->oop_is_instance(), "layout is correct");
    1.30 @@ -3213,7 +3217,9 @@
    1.31      //this_klass->set_super(super_klass());
    1.32      this_klass->set_class_loader(class_loader());
    1.33      this_klass->set_nonstatic_field_size(nonstatic_field_size);
    1.34 -    this_klass->set_has_nonstatic_fields(has_nonstatic_fields);
    1.35 +    if (has_nonstatic_fields) {
    1.36 +       this_klass->set_has_nonstatic_fields();
    1.37 +    }
    1.38      this_klass->set_static_oop_field_size(fac.static_oop_count);
    1.39      cp->set_pool_holder(this_klass());
    1.40      this_klass->set_constants(cp());

mercurial