By generating the type of Node_Field_Table with a "not null" qualifier
we check the null exclusion of its elements only once, at the object
declaration.
Tiny performance improvement for the debug builds (because in production
builds checks are disabled anyway); semantics is unaffected.
gcc/ada/ChangeLog:
* gen_il-gen.adb (Put_Tables): Add "not null" to the generated code.
* rtsfind.adb (Cstring_Ptr): Same for table with predefined RE_Id
error messages.
* impunit.adb (Aunit_Record): Same for array of alternative unit names.
Field_Enum_Type_Name & "_Index range <>) of " &
Field_Enum_Type_Name & ";" & LF);
Put (S, "type " & Field_Enum_Type_Name &
- "_Array_Ref is access constant " & Field_Enum_Type_Name &
+ "_Array_Ref is not null access constant " & Field_Enum_Type_Name &
"_Array;" & LF);
Put (S, "subtype A is " & Field_Enum_Type_Name & "_Array;" & LF);
-- Short name to make allocators below more readable
type Aunit_Record is record
Fname : String (1 .. 6);
- Aname : String_Ptr_Const;
+ Aname : not null String_Ptr_Const;
end record;
-- Array of alternative unit names
-- packed component size of 43 is not supported
- type CString_Ptr is access constant String;
+ type CString_Ptr is not null access constant String;
type PRE_Id_Entry is record
Str : CString_Ptr;