diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2009-04-17 11:38:12 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2009-04-17 11:38:12 +0200 |
commit | f3b01cd988069ab653fb34488c6f0ea9bfb2bae6 (patch) | |
tree | 69f024da5f301a5d19395994058f7c9fff2082b9 /gcc/ada/atree.ads | |
parent | cec29135594f16fbbeafdb0ce26a65613c4d0567 (diff) | |
download | gcc-f3b01cd988069ab653fb34488c6f0ea9bfb2bae6.zip gcc-f3b01cd988069ab653fb34488c6f0ea9bfb2bae6.tar.gz gcc-f3b01cd988069ab653fb34488c6f0ea9bfb2bae6.tar.bz2 |
[multiple changes]
2009-04-17 Ed Schonberg <schonberg@adacore.com>
* atree.ads, atree.adb: Move New_Copy_Tree.to sem_util.
* nlists.ads, nlists.adb: Move New_Copy_List to sem_util.
* lib-load.adb: Use Copy_Separate_Tree rather than New_Copy_Tree
* sem_util.ads, sem_util.adb: New_Copy_Tree and New_Copy_List belong in
semantic units, because the handling of itypes in the copied tree
requires semantic information that does not belong in atree.
2009-04-17 Robert Dewar <dewar@adacore.com>
* par-ch6.adb: Minor reformatting
* prj.adb: Minor reformatting
From-SVN: r146230
Diffstat (limited to 'gcc/ada/atree.ads')
-rw-r--r-- | gcc/ada/atree.ads | 91 |
1 files changed, 90 insertions, 1 deletions
diff --git a/gcc/ada/atree.ads b/gcc/ada/atree.ads index df25f6e..8807638 100644 --- a/gcc/ada/atree.ads +++ b/gcc/ada/atree.ads @@ -430,7 +430,7 @@ package Atree is -- Source to be Empty, in which case Relocate_Node simply returns -- Empty as the result. - function New_Copy_Tree + function New_Copy_Tree1 (Source : Node_Id; Map : Elist_Id := No_Elist; New_Sloc : Source_Ptr := No_Location; @@ -3114,6 +3114,95 @@ package Atree is for Node_Record'Size use 8*32; for Node_Record'Alignment use 4; + function E_To_N is new Unchecked_Conversion (Entity_Kind, Node_Kind); + function N_To_E is new Unchecked_Conversion (Node_Kind, Entity_Kind); + + -- Default value used to initialize default nodes. Note that some of the + -- fields get overwritten, and in particular, Nkind always gets reset. + + Default_Node : Node_Record := ( + Is_Extension => False, + Pflag1 => False, + Pflag2 => False, + In_List => False, + Unused_1 => False, + Rewrite_Ins => False, + Analyzed => False, + Comes_From_Source => False, + -- modified by Set_Comes_From_Source_Default + Error_Posted => False, + Flag4 => False, + + Flag5 => False, + Flag6 => False, + Flag7 => False, + Flag8 => False, + Flag9 => False, + Flag10 => False, + Flag11 => False, + Flag12 => False, + + Flag13 => False, + Flag14 => False, + Flag15 => False, + Flag16 => False, + Flag17 => False, + Flag18 => False, + + Nkind => N_Unused_At_Start, + + Sloc => No_Location, + Link => Empty_List_Or_Node, + Field1 => Empty_List_Or_Node, + Field2 => Empty_List_Or_Node, + Field3 => Empty_List_Or_Node, + Field4 => Empty_List_Or_Node, + Field5 => Empty_List_Or_Node); + + -- Default value used to initialize node extensions (i.e. the second + -- and third and fourth components of an extended node). Note we are + -- cheating a bit here when it comes to Node12, which really holds + -- flags an (for the third component), the convention. But it works + -- because Empty, False, Convention_Ada, all happen to be all zero bits. + + Default_Node_Extension : constant Node_Record := ( + Is_Extension => True, + Pflag1 => False, + Pflag2 => False, + In_List => False, + Unused_1 => False, + Rewrite_Ins => False, + Analyzed => False, + Comes_From_Source => False, + Error_Posted => False, + Flag4 => False, + + Flag5 => False, + Flag6 => False, + Flag7 => False, + Flag8 => False, + Flag9 => False, + Flag10 => False, + Flag11 => False, + Flag12 => False, + + Flag13 => False, + Flag14 => False, + Flag15 => False, + Flag16 => False, + Flag17 => False, + Flag18 => False, + + Nkind => E_To_N (E_Void), + + Field6 => Empty_List_Or_Node, + Field7 => Empty_List_Or_Node, + Field8 => Empty_List_Or_Node, + Field9 => Empty_List_Or_Node, + Field10 => Empty_List_Or_Node, + Field11 => Empty_List_Or_Node, + Field12 => Empty_List_Or_Node); + -- The following defines the extendable array used for the nodes table -- Nodes with extensions use five consecutive entries in the array |