< prev index next >

src/hotspot/share/oops/instanceKlass.cpp

Print this page
rev 48545 : Value-based classes (vbc) / Oop value test via metadata ptr

@@ -157,11 +157,10 @@
   assert(class_name != NULL, "invariant");
   ClassLoaderData* loader_data = parser.loader_data();
   assert(loader_data != NULL, "invariant");
 
   InstanceKlass* ik;
-
   // Allocation
   if (REF_NONE == parser.reference_type()) {
     if (class_name == vmSymbols::java_lang_Class()) {
       // mirror
       ik = new (loader_data, size, THREAD) InstanceMirrorKlass(parser);

@@ -170,11 +169,16 @@
       // class loader
       ik = new (loader_data, size, THREAD) InstanceClassLoaderKlass(parser);
     }
     else {
       // normal
+#if INCLUDE_VBC
+      bool is_value = parser.access_flags().is_value_based_class();
+      ik = new (loader_data, size, is_value, THREAD) InstanceKlass(parser, InstanceKlass::_misc_kind_other);
+#else
       ik = new (loader_data, size, THREAD) InstanceKlass(parser, InstanceKlass::_misc_kind_other);
+#endif
     }
   }
   else {
     // reference
     ik = new (loader_data, size, THREAD) InstanceRefKlass(parser);
< prev index next >