mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +02:00
8247444: Trust final fields in records
Co-authored-by: Christoph Dreis <christoph.dreis@freenet.de> Reviewed-by: jrose, dholmes, forax, coleenp, vlivanov
This commit is contained in:
parent
983e012c9f
commit
f2b191a6e9
26 changed files with 227 additions and 49 deletions
|
@ -696,6 +696,7 @@ class java_lang_reflect_Field : public java_lang_reflect_AccessibleObject {
|
|||
static int _type_offset;
|
||||
static int _slot_offset;
|
||||
static int _modifiers_offset;
|
||||
static int _trusted_final_offset;
|
||||
static int _signature_offset;
|
||||
static int _annotations_offset;
|
||||
|
||||
|
@ -723,6 +724,8 @@ class java_lang_reflect_Field : public java_lang_reflect_AccessibleObject {
|
|||
static int modifiers(oop field);
|
||||
static void set_modifiers(oop field, int value);
|
||||
|
||||
static void set_trusted_final(oop field);
|
||||
|
||||
static void set_signature(oop constructor, oop value);
|
||||
static void set_annotations(oop constructor, oop value);
|
||||
static void set_parameter_annotations(oop method, oop value);
|
||||
|
@ -1121,6 +1124,7 @@ class java_lang_invoke_MemberName: AllStatic {
|
|||
MN_IS_FIELD = 0x00040000, // field
|
||||
MN_IS_TYPE = 0x00080000, // nested type
|
||||
MN_CALLER_SENSITIVE = 0x00100000, // @CallerSensitive annotation detected
|
||||
MN_TRUSTED_FINAL = 0x00200000, // trusted final field
|
||||
MN_REFERENCE_KIND_SHIFT = 24, // refKind
|
||||
MN_REFERENCE_KIND_MASK = 0x0F000000 >> MN_REFERENCE_KIND_SHIFT,
|
||||
// The SEARCH_* bits are not for MN.flags but for the matchFlags argument of MHN.getMembers:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue