summaryrefslogtreecommitdiff
path: root/gcc/ada/sem_disp.ads
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2010-09-09 09:47:53 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2010-09-09 09:47:53 +0000
commit4d2fc0014ea682cb02e9a899fef9a19aee760346 (patch)
tree582bff1f7c1e5aea268c3bbccb6aa355adcb63cd /gcc/ada/sem_disp.ads
parent6797073fef956e34c8d6c470c90d4c2841090c7c (diff)
downloadgcc-4d2fc0014ea682cb02e9a899fef9a19aee760346.tar.gz
2010-09-09 Javier Miranda <miranda@adacore.com>
* sem_ch3.adb (Derive_Subprogram): The code that checks if a dispatching primitive covers some interface primitive is incomplete. Replace such code by the invocation of a new subprogram that provides this functionality. * sem_ch6.ads (Is_Interface_Conformant): Add missing documentation. * sem_ch6.adb (Check_Missing_Return): Minor reformating (Check_Convention): Complete if-statement conditition when reporting errors (to avoid assertion failure). * sem_ch13.adb (Make_Null_Procedure_Specs): This routine was previously located in exp_ch3. Relocated inside Analyze_Freeze_Entity. (Analyze_Freeze_Entity): Invoke routine that adds the spec of non overridden null interface primitives. * sem_type.adb (Is_Ancestor): If the parent of the partial view of a private type is an interface then use the parent of its full view to climb to its ancestor type. * sem_disp.ads, sem_disp.adb (Covers_Some_Interface): New subprogram. (Check_Dispatching_Operation): Extend assertion to handle wrappers of null interface primitives. (Is_Null_Interface_Primitive): New subprogram. * exp_ch3.adb (Make_Null_Procedure_Specs): Removed. (Expand_Freeze_Record_Type): Do not generate specs of null interface subprograms because they are now generated by Analyze_Freeze_Entity. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@164059 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/sem_disp.ads')
-rw-r--r--gcc/ada/sem_disp.ads8
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/ada/sem_disp.ads b/gcc/ada/sem_disp.ads
index 3877826ca29..1888a6854ab 100644
--- a/gcc/ada/sem_disp.ads
+++ b/gcc/ada/sem_disp.ads
@@ -66,6 +66,11 @@ package Sem_Disp is
-- of "OldSubp" is adjusted to point to the inherited procedure of the
-- full view because it is always this one which has to be called.
+ function Covers_Some_Interface (Prim : Entity_Id) return Boolean;
+ -- Returns true if Prim covers some interface primitive of its associated
+ -- tagged type. The tagged type of Prim must be frozen when this function
+ -- is invoked.
+
function Find_Controlling_Arg (N : Node_Id) return Node_Id;
-- Returns the actual controlling argument if N is dynamically tagged,
-- and Empty if it is not dynamically tagged.
@@ -87,6 +92,9 @@ package Sem_Disp is
-- an expression of a class_Wide type, or a call to a function with
-- controlling result where at least one operand is dynamically tagged.
+ function Is_Null_Interface_Primitive (E : Entity_Id) return Boolean;
+ -- Returns True if E is a null procedure that is an interface primitive
+
function Is_Tag_Indeterminate (N : Node_Id) return Boolean;
-- An expression is tag-indeterminate if it is a call that dispatches
-- on result, and all controlling operands are also indeterminate.