cstand.adb: Complete previous change.
2010-06-22 Robert Dewar <dewar@adacore.com> * cstand.adb: Complete previous change. * g-dirope.ads: Add comment. * s-stchop.adb, sfn_scan.adb: Minor reformatting. From-SVN: r161206
This commit is contained in:
parent
ea7f928bd6
commit
17bb3f185a
@ -1,3 +1,9 @@
|
||||
2010-06-22 Robert Dewar <dewar@adacore.com>
|
||||
|
||||
* cstand.adb: Complete previous change.
|
||||
* g-dirope.ads: Add comment.
|
||||
* s-stchop.adb, sfn_scan.adb: Minor reformatting.
|
||||
|
||||
2010-06-22 Ed Schonberg <schonberg@adacore.com>
|
||||
|
||||
* cstand.adb: Add tree nodes for pragma Pack on string types.
|
||||
|
@ -119,10 +119,6 @@ package body CStand is
|
||||
(New_Node_Kind : Node_Kind := N_Defining_Identifier) return Entity_Id;
|
||||
-- Builds a new entity for Standard
|
||||
|
||||
procedure Pack_String_Type (String_Type : Entity_Id);
|
||||
-- Generate the proper tree for the pragma Pack that applies to each
|
||||
-- string type.
|
||||
|
||||
procedure Print_Standard;
|
||||
-- Print representation of package Standard if switch set
|
||||
|
||||
@ -328,6 +324,9 @@ package body CStand is
|
||||
procedure Build_Exception (S : Standard_Entity_Type);
|
||||
-- Procedure to declare given entity as an exception
|
||||
|
||||
procedure Pack_String_Type (String_Type : Entity_Id);
|
||||
-- Generate proper tree for pragma Pack that applies to given type
|
||||
|
||||
---------------------
|
||||
-- Build_Exception --
|
||||
---------------------
|
||||
@ -345,6 +344,24 @@ package body CStand is
|
||||
Append (Decl, Decl_S);
|
||||
end Build_Exception;
|
||||
|
||||
----------------------
|
||||
-- Pack_String_Type --
|
||||
----------------------
|
||||
|
||||
procedure Pack_String_Type (String_Type : Entity_Id) is
|
||||
Prag : constant Node_Id :=
|
||||
Make_Pragma (Stloc,
|
||||
Chars => Name_Pack,
|
||||
Pragma_Argument_Associations =>
|
||||
New_List (
|
||||
Make_Pragma_Argument_Association (Stloc,
|
||||
Expression => New_Occurrence_Of (String_Type, Stloc))));
|
||||
|
||||
begin
|
||||
Append (Prag, Decl_S);
|
||||
Record_Rep_Item (String_Type, Prag);
|
||||
end Pack_String_Type;
|
||||
|
||||
-- Start of processing for Create_Standard
|
||||
|
||||
begin
|
||||
@ -1631,19 +1648,6 @@ package body CStand is
|
||||
return E;
|
||||
end New_Standard_Entity;
|
||||
|
||||
----------------------
|
||||
-- Pack_String_Type --
|
||||
----------------------
|
||||
|
||||
procedure Pack_String_Type (String_Type : Entity_Id) is
|
||||
begin
|
||||
Record_Rep_Item (String_Type,
|
||||
Make_Pragma (Stloc,
|
||||
Chars => Name_Pack,
|
||||
Pragma_Argument_Associations =>
|
||||
New_List (New_Occurrence_Of (String_Type, Stloc))));
|
||||
end Pack_String_Type;
|
||||
|
||||
--------------------
|
||||
-- Print_Standard --
|
||||
--------------------
|
||||
|
@ -210,7 +210,7 @@ package GNAT.Directory_Operations is
|
||||
--
|
||||
-- System_Default
|
||||
-- Uses either UNIX on Unix and OpenVMS systems, or DOS on Windows,
|
||||
-- depending on the running environment.
|
||||
-- depending on the running environment. What about other OS's???
|
||||
|
||||
---------------
|
||||
-- Iterators --
|
||||
|
@ -48,28 +48,24 @@ package body System.Stack_Checking.Operations is
|
||||
|
||||
function Set_Stack_Info
|
||||
(Stack : not null access Stack_Access) return Stack_Access;
|
||||
|
||||
-- The function Set_Stack_Info is the actual function that updates the
|
||||
-- cache containing a pointer to the Stack_Info. It may also be used for
|
||||
-- detecting asynchronous abort in combination with Invalidate_Self_Cache.
|
||||
|
||||
--
|
||||
-- Set_Stack_Info should do the following things in order:
|
||||
-- 1) Get the Stack_Access value for the current task
|
||||
-- 2) Set Stack.all to the value obtained in 1)
|
||||
-- 3) Optionally Poll to check for asynchronous abort
|
||||
|
||||
--
|
||||
-- This order is important because if at any time a write to the stack
|
||||
-- cache is pending, that write should be followed by a Poll to prevent
|
||||
-- loosing signals.
|
||||
|
||||
--
|
||||
-- Note: This function must be compiled with Polling turned off
|
||||
|
||||
-- Note: on systems with real thread-local storage,
|
||||
-- Set_Stack_Info should return an access value for such local
|
||||
-- storage. In those cases the cache will always be up-to-date.
|
||||
|
||||
-- The following constants should be imported from some system-specific
|
||||
-- constants package. The constants must be static for performance reasons.
|
||||
--
|
||||
-- Note: on systems with real thread-local storage, Set_Stack_Info should
|
||||
-- return an access value for such local storage. In those cases the cache
|
||||
-- will always be up-to-date.
|
||||
|
||||
----------------------------
|
||||
-- Invalidate_Stack_Cache --
|
||||
|
@ -37,10 +37,10 @@ package body SFN_Scan is
|
||||
-- Allow easy access to control character definitions
|
||||
|
||||
EOF : constant Character := ASCII.SUB;
|
||||
-- The character SUB (16#1A#) is DOS-derived systems, such as Windows
|
||||
-- to signal the end of a text file. If this character appears as the
|
||||
-- last character of a file scanned by a call to Scan_SFN_Pragmas,
|
||||
-- then it is ignored, otherwise it is treated as an illegal character.
|
||||
-- The character SUB (16#1A#) is used in DOS-derived systems, such as
|
||||
-- Windows to signal the end of a text file. If this character appears as
|
||||
-- the last character of a file scanned by a call to Scan_SFN_Pragmas, then
|
||||
-- it is ignored, otherwise it is treated as an illegal character.
|
||||
|
||||
type String_Ptr is access String;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user