summaryrefslogtreecommitdiff
path: root/gcc/ada/sem_disp.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2011-08-04 13:45:00 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2011-08-04 13:45:00 +0000
commit79500ea01a1a06d39f68bd5445053a302a2ca901 (patch)
tree710e2f1e08527a3afb606e3c5eae2c17bf88a373 /gcc/ada/sem_disp.adb
parentf239f5be0dd95fd0a814da3fbe434e27f367d5a9 (diff)
downloadgcc-79500ea01a1a06d39f68bd5445053a302a2ca901.tar.gz
2011-08-04 Javier Miranda <miranda@adacore.com>
* exp_ch7.adb (Expand_N_Package_Body, Expand_N_Package_Declaration): Remove code which takes care of building TSDs. * rtsfind.ads (RE_Check_Interface_Conversion): New entity. * exp_ch4.adb (Apply_Accessibility_Check): Add support for generating the accessibility check in VM targets. * exp_disp.adb (Make_VM_TSD): Spec moved to exp_disp.ads (Building_Static_DT): Now returns false for VM targets. (Build_VM_TSDs): Removed. (Expand_Interface_Conversion): Generate missing runtime check for conversions to interface types whose target type is unknown at compile time. (Make_VM_TSD): Add missing code to disable the generation of calls to Check_TSD if the tagged type is not defined at library level, or not has a representation clause specifying its external tag, or -gnatdQ is active. * exp_disp.ads (Build_VM_TSDs): Removed. (Make_VM_TSDs): Spec relocated from exp_disp.adb * sem_disp.adb (Check_Dispatching_Operation): No code required to register primitives in the dispatch tables in VM targets. * exp_ch3.adb (Expand_N_Object_Declaration): Remove wrong expansion of initialization of class-wide interface objects in VM targets. (Expand_Freeze_Record_Type): For VM targets call Make_VM_TSD (instead of Make_DT). 2011-08-04 Jerome Lambourg <lambourg@adacore.com> * gnatlink.adb (Gnatlink): Correct missleading error message displayed when dotnet-ld cannot be found. 2011-08-04 Arnaud Charlet <charlet@adacore.com> * bindgen.adb: Simplify significantly generation of binder body file in CodePeer mode. * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Prevent assert failure when compiling binder generated file in CodePeer mode (xxx'Elab_Spec not expanded). git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@177387 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/sem_disp.adb')
-rw-r--r--gcc/ada/sem_disp.adb10
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/ada/sem_disp.adb b/gcc/ada/sem_disp.adb
index b58f8c0e1a7..66fcb07e0ab 100644
--- a/gcc/ada/sem_disp.adb
+++ b/gcc/ada/sem_disp.adb
@@ -49,6 +49,7 @@ with Sem_Type; use Sem_Type;
with Sem_Util; use Sem_Util;
with Snames; use Snames;
with Sinfo; use Sinfo;
+with Targparm; use Targparm;
with Tbuild; use Tbuild;
with Uintp; use Uintp;
@@ -1028,6 +1029,12 @@ package body Sem_Disp is
" the type!", Subp);
end if;
+ -- No code required to register primitives in VM
+ -- targets
+
+ elsif VM_Target /= No_VM then
+ null;
+
else
Insert_Actions_After (Subp_Body,
Register_Primitive (Sloc (Subp_Body),
@@ -1158,10 +1165,13 @@ package body Sem_Disp is
while Present (Elmt) loop
Prim := Node (Elmt);
+ -- No code required to register primitives in VM targets
+
if Present (Alias (Prim))
and then Present (Interface_Alias (Prim))
and then Alias (Prim) = Subp
and then not Building_Static_DT (Tagged_Type)
+ and then VM_Target = No_VM
then
Insert_Actions_After (Subp_Body,
Register_Primitive (Sloc (Subp_Body), Prim => Prim));