diff src/share/vm/oops/instanceKlass.hpp @ 20576:90257dfad6e3

8043275: 8u40 backport: Fix interface initialization for default methods. Reviewed-by: dcubed, coleenp
author acorn
date Fri, 24 Oct 2014 12:29:08 -0700
parents 6e0cb14ce59b
children 3c87c13918fb
line wrap: on
line diff
--- a/src/share/vm/oops/instanceKlass.hpp	Fri Oct 24 03:03:59 2014 +0000
+++ b/src/share/vm/oops/instanceKlass.hpp	Fri Oct 24 12:29:08 2014 -0700
@@ -229,12 +229,13 @@
   bool            _has_unloaded_dependent;
 
   enum {
-    _misc_rewritten            = 1 << 0, // methods rewritten.
-    _misc_has_nonstatic_fields = 1 << 1, // for sizing with UseCompressedOops
-    _misc_should_verify_class  = 1 << 2, // allow caching of preverification
-    _misc_is_anonymous         = 1 << 3, // has embedded _host_klass field
-    _misc_is_contended         = 1 << 4, // marked with contended annotation
-    _misc_has_default_methods  = 1 << 5  // class/superclass/implemented interfaces has default methods
+    _misc_rewritten                = 1 << 0, // methods rewritten.
+    _misc_has_nonstatic_fields     = 1 << 1, // for sizing with UseCompressedOops
+    _misc_should_verify_class      = 1 << 2, // allow caching of preverification
+    _misc_is_anonymous             = 1 << 3, // has embedded _host_klass field
+    _misc_is_contended             = 1 << 4, // marked with contended annotation
+    _misc_has_default_methods      = 1 << 5, // class/superclass/implemented interfaces has default methods
+    _misc_declares_default_methods = 1 << 6  // directly declares default methods (any access)
   };
   u2              _misc_flags;
   u2              _minor_version;        // minor version number of class file
@@ -680,6 +681,17 @@
     }
   }
 
+  bool declares_default_methods() const {
+    return (_misc_flags & _misc_declares_default_methods) != 0;
+  }
+  void set_declares_default_methods(bool b) {
+    if (b) {
+      _misc_flags |= _misc_declares_default_methods;
+    } else {
+      _misc_flags &= ~_misc_declares_default_methods;
+    }
+  }
+
   // for adding methods, ConstMethod::UNSET_IDNUM means no more ids available
   inline u2 next_method_idnum();
   void set_initial_method_idnum(u2 value)             { _idnum_allocated_count = value; }
@@ -1046,6 +1058,7 @@
   static bool link_class_impl                           (instanceKlassHandle this_oop, bool throw_verifyerror, TRAPS);
   static bool verify_code                               (instanceKlassHandle this_oop, bool throw_verifyerror, TRAPS);
   static void initialize_impl                           (instanceKlassHandle this_oop, TRAPS);
+  static void initialize_super_interfaces               (instanceKlassHandle this_oop, TRAPS);
   static void eager_initialize_impl                     (instanceKlassHandle this_oop);
   static void set_initialization_state_and_notify_impl  (instanceKlassHandle this_oop, ClassState state, TRAPS);
   static void call_class_initializer_impl               (instanceKlassHandle this_oop, TRAPS);