Index: src/natools-accumulators-string_accumulator_linked_lists.ads ================================================================== --- src/natools-accumulators-string_accumulator_linked_lists.ads +++ src/natools-accumulators-string_accumulator_linked_lists.ads @@ -27,10 +27,11 @@ type String_Accumulator_Linked_List (Build : not null access function (Depth : Positive) return String_Accumulator'Class) is new String_Accumulator_Stack with private; + pragma Preelaborable_Initialization (String_Accumulator_Linked_List); procedure Append (To : in out String_Accumulator_Linked_List; Text : String); -- Append the given String to the internal buffer Index: src/natools-cron.ads ================================================================== --- src/natools-cron.ads +++ src/natools-cron.ads @@ -44,10 +44,11 @@ Period : Duration; end record; type Cron_Entry is tagged limited private; + pragma Preelaborable_Initialization (Cron_Entry); function Create (Time : in Periodic_Time; Callback : in Cron.Callback'Class) return Cron_Entry; Index: src/natools-references__intel.ads ================================================================== --- src/natools-references__intel.ads +++ src/natools-references__intel.ads @@ -44,10 +44,11 @@ type Data_Access is access Held_Data; for Data_Access'Storage_Pool use Data_Pool; type Immutable_Reference is new Ada.Finalization.Controlled with private; + pragma Preelaborable_Initialization (Immutable_Reference); function Create (Constructor : not null access function return Held_Data) return Immutable_Reference; -- Create a new held object and return a reference to it @@ -87,10 +88,11 @@ Null_Immutable_Reference : constant Immutable_Reference; type Reference is new Immutable_Reference with private; + pragma Preelaborable_Initialization (Reference); function Update (Ref : in Reference) return Mutator; pragma Inline (Update); -- Return a ereferenciable mutable access to the held object Index: src/natools-references__protected.ads ================================================================== --- src/natools-references__protected.ads +++ src/natools-references__protected.ads @@ -42,10 +42,11 @@ type Data_Access is access Held_Data; for Data_Access'Storage_Pool use Data_Pool; type Immutable_Reference is new Ada.Finalization.Controlled with private; + pragma Preelaborable_Initialization (Immutable_Reference); function Create (Constructor : not null access function return Held_Data) return Immutable_Reference; -- Create a new held object and return a reference to it @@ -85,10 +86,11 @@ Null_Immutable_Reference : constant Immutable_Reference; type Reference is new Immutable_Reference with private; + pragma Preelaborable_Initialization (Reference); function Update (Ref : in Reference) return Mutator; pragma Inline (Update); -- Return a ereferenciable mutable access to the held object Index: src/natools-references__unsafe.ads ================================================================== --- src/natools-references__unsafe.ads +++ src/natools-references__unsafe.ads @@ -41,10 +41,11 @@ type Data_Access is access Held_Data; for Data_Access'Storage_Pool use Data_Pool; type Immutable_Reference is new Ada.Finalization.Controlled with private; + pragma Preelaborable_Initialization (Immutable_Reference); function Create (Constructor : not null access function return Held_Data) return Immutable_Reference; -- Create a new held object and return a reference to it @@ -84,10 +85,11 @@ Null_Immutable_Reference : constant Immutable_Reference; type Reference is new Immutable_Reference with private; + pragma Preelaborable_Initialization (Reference); function Update (Ref : in Reference) return Mutator; pragma Inline (Update); -- Return a ereferenciable mutable access to the held object Index: src/natools-s_expressions-atom_buffers.ads ================================================================== --- src/natools-s_expressions-atom_buffers.ads +++ src/natools-s_expressions-atom_buffers.ads @@ -26,10 +26,11 @@ package Natools.S_Expressions.Atom_Buffers is pragma Preelaborate (Atom_Buffers); type Atom_Buffer is tagged private; + pragma Preelaborable_Initialization (Atom_Buffer); procedure Preallocate (Buffer : in out Atom_Buffer; Length : in Count); -- Preallocate enough memory to append Length octets without -- any further allocation. Index: src/natools-s_expressions-dynamic_interpreters.ads ================================================================== --- src/natools-s_expressions-dynamic_interpreters.ads +++ src/natools-s_expressions-dynamic_interpreters.ads @@ -63,10 +63,11 @@ Do_Nothing : Null_Command := Null_Command'(null record); type Interpreter is new Command with private; + pragma Preelaborable_Initialization (Interpreter); procedure Add_Command (Self : in out Interpreter; Name : in Atom; Cmd : in Command'Class); Index: src/natools-s_expressions-generic_caches.ads ================================================================== --- src/natools-s_expressions-generic_caches.ads +++ src/natools-s_expressions-generic_caches.ads @@ -42,10 +42,11 @@ package Natools.S_Expressions.Generic_Caches is pragma Preelaborate (Generic_Caches); type Reference is new Printers.Printer with private; + pragma Preelaborable_Initialization (Reference); overriding procedure Open_List (Output : in out Reference); overriding procedure Append_Atom (Output : in out Reference; Data : in Atom); overriding procedure Close_List (Output : in out Reference); @@ -53,10 +54,11 @@ function Duplicate (Cache : Reference) return Reference; -- Create a new copy of the S-expression held in Cache and return it type Cursor is new Lockable.Descriptor with private; + pragma Preelaborable_Initialization (Cursor); overriding function Current_Event (Object : in Cursor) return Events.Event; overriding function Current_Atom (Object : in Cursor) return Atom; overriding function Current_Level (Object : in Cursor) return Natural; overriding procedure Query_Atom @@ -140,15 +142,15 @@ Exp : Trees.Reference; end record; type Cursor is new Lockable.Descriptor with record - Exp : Trees.Reference := Trees.Null_Reference; + Exp : Trees.Reference; Position : Node_Access := null; Opening : Boolean := False; Stack : Lockable.Lock_Stack; Locked : Boolean := False; end record; function Absolute_Level (Object : Cursor) return Natural; end Natools.S_Expressions.Generic_Caches; Index: src/natools-s_expressions-interpreters.ads ================================================================== --- src/natools-s_expressions-interpreters.ads +++ src/natools-s_expressions-interpreters.ads @@ -65,10 +65,11 @@ Do_Nothing : Null_Command := Null_Command'(null record); type Interpreter is new Command with private; + pragma Preelaborable_Initialization (Interpreter); procedure Add_Command (Self : in out Interpreter; Name : in Atom; Cmd : in Command'Class); @@ -116,10 +117,12 @@ Context : in Shared_Context; Cmd : in out Lockable.Descriptor'Class); -- Execute a single command with arguments type Command_Description is private; + pragma Preelaborable_Initialization (Command_Description); + type Command_Array is array (Positive range <>) of Command_Description; function Build (Commands : Command_Array) return Interpreter; function Build (Commands : Command_Array; Fallback : String) return Interpreter; Index: src/natools-s_expressions-lockable.ads ================================================================== --- src/natools-s_expressions-lockable.ads +++ src/natools-s_expressions-lockable.ads @@ -27,11 +27,13 @@ package Natools.S_Expressions.Lockable is pragma Pure (Lockable); type Lock_Stack is private; + pragma Preelaborable_Initialization (Lock_Stack); type Lock_State is private; + pragma Preelaborable_Initialization (Lock_State); procedure Push_Level (Stack : in out Lock_Stack; Level : in Natural; State : out Lock_State); @@ -71,10 +73,11 @@ -- end of locked level (unless Finish is False). type Wrapper (Backend : access S_Expressions.Descriptor'Class) is new Descriptor with private; + pragma Preelaborable_Initialization (Wrapper); -- Wrapper layer on top of a non-lockable object, albeit with the -- performance penalty of an extra layer. function Current_Event (Object : in Wrapper) return Events.Event; function Current_Atom (Object : in Wrapper) return Atom; Index: src/natools-s_expressions-parsers.ads ================================================================== --- src/natools-s_expressions-parsers.ads +++ src/natools-s_expressions-parsers.ads @@ -31,10 +31,11 @@ package Natools.S_Expressions.Parsers is pragma Preelaborate (Natools.S_Expressions.Parsers); type Parser is abstract limited new Lockable.Descriptor with private; + pragma Preelaborable_Initialization (Parser); procedure Read_More (Self : in out Parser; Buffer : out Atom_Buffers.Atom_Buffer) is abstract; @@ -70,10 +71,11 @@ type Stream_Parser (Input : access Ada.Streams.Root_Stream_Type'Class) is limited new Lockable.Descriptor with private; + pragma Preelaborable_Initialization (Stream_Parser); private type Internal_State is (Waiting, -- waiting for a marker Index: src/natools-s_expressions-printers-pretty.ads ================================================================== --- src/natools-s_expressions-printers-pretty.ads +++ src/natools-s_expressions-printers-pretty.ads @@ -59,10 +59,11 @@ -- an asterisk (*) can have any value and still be canonical. Canonical : constant Parameters := (others => <>); type Printer is abstract limited new Printers.Printer with private; + pragma Preelaborable_Initialization (Printer); procedure Write_Raw (Output : in out Printer; Data : in Ada.Streams.Stream_Element_Array) is abstract; Index: src/natools-string_slices-slice_sets.ads ================================================================== --- src/natools-string_slices-slice_sets.ads +++ src/natools-string_slices-slice_sets.ads @@ -30,10 +30,11 @@ package Natools.String_Slices.Slice_Sets is pragma Preelaborate (Slice_Sets); type Slice_Set is tagged private; + pragma Preelaborable_Initialization (Slice_Set); ---------------------------- -- Conversion subprograms -- ---------------------------- Index: src/natools-string_slices.ads ================================================================== --- src/natools-string_slices.ads +++ src/natools-string_slices.ads @@ -65,10 +65,11 @@ ---------------- -- Slice type -- ---------------- type Slice is tagged private; + pragma Preelaborable_Initialization (Slice); Null_Slice : constant Slice; --------------------------