summaryrefslogtreecommitdiff
path: root/gcc/ada/sinfo.ads
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ada/sinfo.ads')
-rw-r--r--gcc/ada/sinfo.ads82
1 files changed, 66 insertions, 16 deletions
diff --git a/gcc/ada/sinfo.ads b/gcc/ada/sinfo.ads
index ba58c82f45f..d2fac335c45 100644
--- a/gcc/ada/sinfo.ads
+++ b/gcc/ada/sinfo.ads
@@ -6,9 +6,9 @@
-- --
-- S p e c --
-- --
--- $Revision: 1.5 $
+-- $Revision: 1.439 $
-- --
--- Copyright (C) 1992-2001, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2002, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
@@ -386,7 +386,7 @@ package Sinfo is
-- In the following node definitions, all fields, both syntactic and
-- semantic, are documented. The one exception is in the case of entities
- -- (defining identifiers, character literals and operator symbols),
+ -- (defining indentifiers, character literals and operator symbols),
-- where the usage of the fields depends on the entity kind. Entity
-- fields are fully documented in the separate package Einfo.
@@ -551,9 +551,9 @@ package Sinfo is
-- All_Others (Flag11-Sem)
-- Present in an N_Others_Choice node. This flag is set in the case
- -- of an others exception where all exceptions, even those that are
- -- not normally handled (in particular the tasking abort signal) by
- -- others. This is used for translation of the at end handler into
+ -- of an others exception where all exceptions are to be caught, even
+ -- those that are not normally handled (in particular the tasking abort
+ -- signal). This is used for translation of the at end handler into
-- a normal exception handler.
-- Assignment_OK (Flag15-Sem)
@@ -1180,6 +1180,16 @@ package Sinfo is
-- Used to collect actions that must be executed within the loop because
-- they may need to be evaluated anew each time through.
+ -- Must_Be_Byte_Aligned (Flag14-Sem)
+ -- This flag is present in N_Attribute_Reference nodes. It can be set
+ -- only for the Address and Unrestricted_Access attributes. If set it
+ -- means that the object for which the address/access is given must be
+ -- on a byte (more accurately a storage unit) boundary. If necessary,
+ -- a copy of the object is to be made before taking the address (this
+ -- copy is in the current scope on the stack frame). This is used for
+ -- certainly cases of code generated by the expander that passes
+ -- parameters by address.
+
-- Must_Not_Freeze (Flag8-Sem)
-- A flag present in all expression nodes. Normally expressions cause
-- freezing as described in the RM. If this flag is set, then this
@@ -1475,6 +1485,7 @@ package Sinfo is
-- Case Statement end case;
-- Record Definition end record;
+ -- Enumeration Definition );
-- The End_Label and End_Span fields are used to mark the locations
-- of these lines, and also keep track of the label in the case where
@@ -1506,6 +1517,9 @@ package Sinfo is
-- entry for the end of a record, since it represents a scope for
-- name declaration purposes.
+ -- The enumeration definition case is handled in an exactly similar
+ -- manner, building a dummy identifier to get a cross-reference.
+
-- Note: the reason we store the difference as a Uint, instead of
-- storing the Source_Ptr value directly, is that Source_Ptr values
-- cannot be distinguished from other types of values, and we count
@@ -2007,6 +2021,7 @@ package Sinfo is
-- N_Enumeration_Type_Definition
-- Sloc points to left parenthesis
-- Literals (List1) (Empty for CHARACTER or WIDE_CHARACTER)
+ -- End_Label (Node4) (set to Empty if internally generated record)
----------------------------------------------
-- 3.5.1 Enumeration Literal Specification --
@@ -2802,6 +2817,15 @@ package Sinfo is
-- a non-standard enumeration type or a nonzero/zero semantics
-- boolean type, so the value is simply the stored representation.
+ -- Note: In generated code, the Address and Unrestricted_Access
+ -- attributes can be applied to any expression, and the meaning is
+ -- to create an object containing the value (the object is in the
+ -- current stack frame), and pass the address of this value. If the
+ -- Must_Be_Byte_Aligned flag is set, then the object whose address
+ -- is taken must be on a byte (storage unit) boundary, and if it is
+ -- not (or may not be), then the generated code must create a copy
+ -- that is byte aligned, and pass the address of this copy.
+
-- N_Attribute_Reference
-- Sloc points to apostrophe
-- Prefix (Node3)
@@ -2813,6 +2837,7 @@ package Sinfo is
-- Do_Overflow_Check (Flag17-Sem)
-- Redundant_Use (Flag13-Sem)
-- OK_For_Stream (Flag4-Sem)
+ -- Must_Be_Byte_Aligned (Flag14)
-- plus fields for expression
---------------------------------
@@ -3456,7 +3481,7 @@ package Sinfo is
-- 5.1 Statement Identifier --
-------------------------------
- -- STATEMENT_IDENTIFIER ::= DIRECT_NAME
+ -- STATEMENT_INDENTIFIER ::= DIRECT_NAME
-- The IDENTIFIER of a STATEMENT_IDENTIFIER shall be an identifier
-- (not an OPERATOR_SYMBOL)
@@ -6063,33 +6088,42 @@ package Sinfo is
-- circuit form whose left argument is static and decisively
-- eliminates elaboration of the raise operation.
+ -- The exception is generated with a message that contains the
+ -- file name and line number, and then appended text. The Reason
+ -- code shows the text to be added. The Reason code is an element
+ -- of the type Types.RT_Exception_Code, and indicates both the
+ -- message to be added, and the exception to be raised (which must
+ -- match the node type). The value is stored by storing a Uint which
+ -- is the Pos value of the enumeration element in this type.
+
-- Gigi restriction: This expander ensures that the type of the
-- Condition field is always Standard.Boolean, even if the type
-- in the source is some non-standard boolean type.
- -- Sprint syntax: [xxx_error]
- -- or: [xxx_error when condition]
+ -- Sprint syntax: [xxx_error "msg"]
+ -- or: [xxx_error when condition "msg"]
-- N_Raise_Constraint_Error
-- Sloc references related construct
-- Condition (Node1) (set to Empty if no condition)
- -- Sloc is copied from the expression generating the exception
+ -- Reason (Uint3)
-- plus fields for expression
-- N_Raise_Program_Error
-- Sloc references related construct
-- Condition (Node1) (set to Empty if no condition)
- -- Sloc is copied from the construct generating the exception
+ -- Reason (Uint3)
-- plus fields for expression
-- N_Raise_Storage_Error
-- Sloc references related construct
-- Condition (Node1) (set to Empty if no condition)
- -- Sloc is copied from the construct generating the exception
+ -- Reason (Uint3)
-- plus fields for expression
- -- Note: in the case where a debug source file is generated, the Sloc
- -- for this node points to the left bracket in the Sprint file output.
+ -- Note: Sloc is copied from the expression generating the exception.
+ -- In the case where a debug source file is generated, the Sloc for
+ -- this node points to the left bracket in the Sprint file output.
---------------
-- Reference --
@@ -7205,6 +7239,9 @@ package Sinfo is
function More_Ids
(N : Node_Id) return Boolean; -- Flag5
+ function Must_Be_Byte_Aligned
+ (N : Node_Id) return Boolean; -- Flag14
+
function Must_Not_Freeze
(N : Node_Id) return Boolean; -- Flag8
@@ -7328,6 +7365,9 @@ package Sinfo is
function Realval
(N : Node_Id) return Ureal; -- Ureal3
+ function Reason
+ (N : Node_Id) return Uint; -- Uint3
+
function Record_Extension_Part
(N : Node_Id) return Node_Id; -- Node3
@@ -7955,6 +7995,9 @@ package Sinfo is
procedure Set_More_Ids
(N : Node_Id; Val : Boolean := True); -- Flag5
+ procedure Set_Must_Be_Byte_Aligned
+ (N : Node_Id; Val : Boolean := True); -- Flag14
+
procedure Set_Must_Not_Freeze
(N : Node_Id; Val : Boolean := True); -- Flag8
@@ -8078,6 +8121,9 @@ package Sinfo is
procedure Set_Realval
(N : Node_Id; Val : Ureal); -- Ureal3
+ procedure Set_Reason
+ (N : Node_Id; Val : Uint); -- Uint3
+
procedure Set_Record_Extension_Part
(N : Node_Id; Val : Node_Id); -- Node3
@@ -8391,6 +8437,7 @@ package Sinfo is
pragma Inline (Low_Bound);
pragma Inline (Mod_Clause);
pragma Inline (More_Ids);
+ pragma Inline (Must_Be_Byte_Aligned);
pragma Inline (Must_Not_Freeze);
pragma Inline (Name);
pragma Inline (Names);
@@ -8430,8 +8477,9 @@ package Sinfo is
pragma Inline (Raises_Constraint_Error);
pragma Inline (Range_Constraint);
pragma Inline (Range_Expression);
- pragma Inline (Realval);
pragma Inline (Real_Range_Specification);
+ pragma Inline (Realval);
+ pragma Inline (Reason);
pragma Inline (Record_Extension_Part);
pragma Inline (Redundant_Use);
pragma Inline (Return_Type);
@@ -8638,6 +8686,7 @@ package Sinfo is
pragma Inline (Set_Low_Bound);
pragma Inline (Set_Mod_Clause);
pragma Inline (Set_More_Ids);
+ pragma Inline (Set_Must_Be_Byte_Aligned);
pragma Inline (Set_Must_Not_Freeze);
pragma Inline (Set_Name);
pragma Inline (Set_Names);
@@ -8676,8 +8725,9 @@ package Sinfo is
pragma Inline (Set_Raises_Constraint_Error);
pragma Inline (Set_Range_Constraint);
pragma Inline (Set_Range_Expression);
- pragma Inline (Set_Realval);
pragma Inline (Set_Real_Range_Specification);
+ pragma Inline (Set_Realval);
+ pragma Inline (Set_Reason);
pragma Inline (Set_Record_Extension_Part);
pragma Inline (Set_Redundant_Use);
pragma Inline (Set_Return_Type);