--- old/src/hotspot/share/oops/cpCache.hpp 2019-03-11 14:26:14.438355041 +0100 +++ new/src/hotspot/share/oops/cpCache.hpp 2019-03-11 14:26:14.054355046 +0100 @@ -49,7 +49,7 @@ // _indices [ b2 | b1 | index ] index = constant_pool_index // _f1 [ entry specific ] metadata ptr (method or klass) // _f2 [ entry specific ] vtable or res_ref index, or vfinal method ptr -// _flags [tos|0|F=1|0|0|0|f|v|0 |0000|field_index] (for field entries) +// _flags [tos|0|F=1|0|N|i|f|v|0 |0000|field_index] (for field entries) // bit length [ 4 |1| 1 |1|1|1|1|1|1 |1 |-3-|----16-----] // _flags [tos|0|F=0|S|A|I|f|0|vf|indy_rf|000|00000|psize] (for method entries) // bit length [ 4 |1| 1 |1|1|1|1|1|1 |-4--|--8--|--8--] @@ -75,6 +75,8 @@ // // The flags after TosState have the following interpretation: // bit 27: 0 for fields, 1 for methods +// N flag true if field is marked flattenable (must never be null) +// i flag true if field is inlined (flattened) // f flag true if field is marked final // v flag true if field is volatile (only for fields) // f2 flag true if f2 contains an oop (e.g., virtual final method) @@ -182,7 +184,9 @@ is_field_entry_shift = 26, // (F) is it a field or a method? has_local_signature_shift = 25, // (S) does the call site have a per-site signature (sig-poly methods)? has_appendix_shift = 24, // (A) does the call site have an appendix argument? + is_flattenable_field_shift = 24, // (N) is the field flattenable (must never be null) is_forced_virtual_shift = 23, // (I) is the interface reference forced to virtual mode? + is_flattened_field_shift = 23, // (i) is the value field flattened? is_final_shift = 22, // (f) is the field or method final? is_volatile_shift = 21, // (v) is the field volatile? is_vfinal_shift = 20, // (vf) did the call resolve to a final method? @@ -222,6 +226,8 @@ TosState field_type, // the (machine) field type bool is_final, // the field is final bool is_volatile, // the field is volatile + bool is_flattened, // the field is flattened (value field) + bool is_flattenable, // the field is flattenable (must never be null) Klass* root_klass // needed by the GC to dirty the klass ); @@ -311,6 +317,7 @@ case Bytecodes::_invokeinterface : return 1; case Bytecodes::_putstatic : // fall through case Bytecodes::_putfield : // fall through + case Bytecodes::_withfield : // fall through case Bytecodes::_invokevirtual : return 2; default : break; } @@ -338,11 +345,13 @@ int f2_as_index() const { assert(!is_vfinal(), ""); return (int) _f2; } Method* f2_as_vfinal_method() const { assert(is_vfinal(), ""); return (Method*)_f2; } Method* f2_as_interface_method() const; + int f2_as_offset() const { assert(is_field_entry(), ""); return (int)_f2; } intx flags_ord() const; int field_index() const { assert(is_field_entry(), ""); return (_flags & field_index_mask); } int parameter_size() const { assert(is_method_entry(), ""); return (_flags & parameter_size_mask); } bool is_volatile() const { return (_flags & (1 << is_volatile_shift)) != 0; } bool is_final() const { return (_flags & (1 << is_final_shift)) != 0; } + bool is_flattened() const { return (_flags & (1 << is_flattened_field_shift)) != 0; } bool is_forced_virtual() const { return (_flags & (1 << is_forced_virtual_shift)) != 0; } bool is_vfinal() const { return (_flags & (1 << is_vfinal_shift)) != 0; } bool indy_resolution_failed() const; @@ -352,6 +361,7 @@ bool is_field_entry() const { return (_flags & (1 << is_field_entry_shift)) != 0; } bool is_long() const { return flag_state() == ltos; } bool is_double() const { return flag_state() == dtos; } + bool is_flattenable() const { return (_flags & (1 << is_flattenable_field_shift)) != 0; } TosState flag_state() const { assert((uint)number_of_states <= (uint)tos_state_mask+1, ""); return (TosState)((_flags >> tos_state_shift) & tos_state_mask); } void set_indy_resolution_failed();