< prev index next >

src/hotspot/share/oops/cpCache.cpp

Print this page

        

@@ -131,18 +131,23 @@
                                        int field_index,
                                        int field_offset,
                                        TosState field_type,
                                        bool is_final,
                                        bool is_volatile,
+                                       bool is_flattened,
+                                       bool is_flattenable,
                                        Klass* root_klass) {
   set_f1(field_holder);
   set_f2(field_offset);
   assert((field_index & field_index_mask) == field_index,
          "field index does not fit in low flag bits");
+  assert(!is_flattened || is_flattenable, "Sanity check");
   set_field_flags(field_type,
                   ((is_volatile ? 1 : 0) << is_volatile_shift) |
-                  ((is_final    ? 1 : 0) << is_final_shift),
+                  ((is_final    ? 1 : 0) << is_final_shift) |
+                  ((is_flattened  ? 1 : 0) << is_flattened_field_shift) |
+                  ((is_flattenable ? 1 : 0) << is_flattenable_field_shift),
                   field_index);
   set_bytecode_1(get_code);
   set_bytecode_2(put_code);
   NOT_PRODUCT(verify(tty));
 }

@@ -296,10 +301,11 @@
       // case, the method gets reresolved with caller for each interface call
       // because the actual selected method may not be public.
       //
       // We set bytecode_2() to _invokevirtual.
       // See also interpreterRuntime.cpp. (8/25/2000)
+      invoke_code = Bytecodes::_invokevirtual;
     } else {
       assert(invoke_code == Bytecodes::_invokevirtual ||
              (invoke_code == Bytecodes::_invokeinterface &&
               ((method->is_private() ||
                 (method->is_final() && method->method_holder() == SystemDictionary::Object_klass())))),

@@ -311,11 +317,11 @@
         // We set bytecode_2() to _invokevirtual.
         set_bytecode_1(invoke_code);
       }
     }
     // set up for invokevirtual, even if linking for invokeinterface also:
-    set_bytecode_2(Bytecodes::_invokevirtual);
+    set_bytecode_2(invoke_code);
   } else {
     ShouldNotReachHere();
   }
   NOT_PRODUCT(verify(tty));
 }
< prev index next >