summaryrefslogtreecommitdiff
path: root/gcc/ada/sem_eval.ads
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2005-03-15 16:00:26 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2005-03-15 16:00:26 +0000
commitba40b4affc67004522f70a179d3667fbedf60167 (patch)
tree5be40e694aeb8be74ad16390f5abbfdfd79db33d /gcc/ada/sem_eval.ads
parent8d8f60b9addfd83e4a016e4bcc397618117ed76e (diff)
downloadgcc-ba40b4affc67004522f70a179d3667fbedf60167.tar.gz
2005-03-08 Robert Dewar <dewar@adacore.com>
Ed Schonberg <schonberg@adacore.com> Richard Kenner <kenner@vlsi1.ultra.nyu.edu> PR ada/19900 * exp_pakd.adb (Create_Packed_Array_Type): Do not set Must_Be_Byte_Aligned for cases where we do not need to use a System.Pack_nn unit. * exp_ch6.adb (Expand_Call): Call Expand_Actuals for functions as well as procedures. Needed now that we do some processing for IN parameters as well. This may well fix some unrelated errors. (Expand_Call): Handle case of unaligned objects (in particular those that come from packed arrays). (Expand_Inlined_Call): If the subprogram is a renaming as body, and the renamed entity is an inherited operation, re-expand the call using the original operation, which is the one to call. Detect attempt to inline parameterless recursive subprogram. (Represented_As_Scalar): Fix to work properly with private types (Is_Possibly_Unaligned_Object): Major rewrite to get a much more accurate estimate. Yields True in far fewer cases than before, improving the quality of code that depends on this test. (Remove_Side_Effects): Properly test for Expansion_Delayed and handle case when it's inside an N_Qualified_Expression. * exp_util.adb (Kill_Dead_Code): For a package declaration, iterate over both visible and private declarations to remove them from tree, and mark subprograms declared in package as eliminated, to prevent spurious use in subsequent compilation of generic units in the context. * exp_util.ads: Minor cleanup in variable names * sem_eval.ads, sem_eval.adb: Minor reformatting (Compile_Time_Known_Bounds): New function git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@96493 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/sem_eval.ads')
-rw-r--r--gcc/ada/sem_eval.ads22
1 files changed, 11 insertions, 11 deletions
diff --git a/gcc/ada/sem_eval.ads b/gcc/ada/sem_eval.ads
index c7b9e907c95..04f7e97bb25 100644
--- a/gcc/ada/sem_eval.ads
+++ b/gcc/ada/sem_eval.ads
@@ -137,8 +137,7 @@ package Sem_Eval is
subtype Compare_LE is Compare_Result range LT .. EQ;
function Compile_Time_Compare
(L, R : Node_Id;
- Rec : Boolean := False)
- return Compare_Result;
+ Rec : Boolean := False) return Compare_Result;
-- Given two expression nodes, finds out whether it can be determined
-- at compile time how the runtime values will compare. An Unknown
-- result means that the result of a comparison cannot be determined at
@@ -194,9 +193,8 @@ package Sem_Eval is
-- range is not static, or because one or the other bound raises CE).
function Subtypes_Statically_Compatible
- (T1 : Entity_Id;
- T2 : Entity_Id)
- return Boolean;
+ (T1 : Entity_Id;
+ T2 : Entity_Id) return Boolean;
-- Returns true if the subtypes are unconstrained or the constraint on
-- on T1 is statically compatible with T2 (as defined by 4.9.1(4)).
-- Otherwise returns false.
@@ -222,6 +220,11 @@ package Sem_Eval is
-- whose constituent expressions are either compile time known values
-- or compile time known aggregates.
+ function Compile_Time_Known_Bounds (T : Entity_Id) return Boolean;
+ -- If T is an array whose index bounds are all known at compile time,
+ -- then True is returned, if T is not an array, or one or more of its
+ -- index bounds is not known at compile time, then False is returned.
+
function Expr_Value (N : Node_Id) return Uint;
-- Returns the folded value of the expression N. This function is called
-- in instances where it has already been determined that the expression
@@ -330,8 +333,7 @@ package Sem_Eval is
(N : Node_Id;
Typ : Entity_Id;
Fixed_Int : Boolean := False;
- Int_Real : Boolean := False)
- return Boolean;
+ Int_Real : Boolean := False) return Boolean;
-- Returns True if it can be guaranteed at compile time that expression
-- N is known to be in range of the subtype Typ. If the values of N or
-- of either bouds of Type are unknown at compile time, False will
@@ -353,8 +355,7 @@ package Sem_Eval is
(N : Node_Id;
Typ : Entity_Id;
Fixed_Int : Boolean := False;
- Int_Real : Boolean := False)
- return Boolean;
+ Int_Real : Boolean := False) return Boolean;
-- Returns True if it can be guaranteed at compile time that expression
-- N is known to be out of range of the subtype Typ. True is returned
-- if Typ is a scalar type, at least one of whose bounds is known at
@@ -367,8 +368,7 @@ package Sem_Eval is
function In_Subrange_Of
(T1 : Entity_Id;
T2 : Entity_Id;
- Fixed_Int : Boolean := False)
- return Boolean;
+ Fixed_Int : Boolean := False) return Boolean;
-- Returns True if it can be guaranteed at compile time that the range
-- of values for scalar type T1 are always in the range of scalar type
-- T2. A result of False does not mean that T1 is not in T2's subrange,