1 ------------------------------------------------------------------------------
3 -- GNAT COMPILER COMPONENTS --
9 -- Copyright (C) 1992-2011, Free Software Foundation, Inc. --
11 -- GNAT is free software; you can redistribute it and/or modify it under --
12 -- terms of the GNU General Public License as published by the Free Soft- --
13 -- ware Foundation; either version 3, or (at your option) any later ver- --
14 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
15 -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
16 -- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
17 -- for more details. You should have received a copy of the GNU General --
18 -- Public License distributed with GNAT; see file COPYING3. If not, go to --
19 -- http://www.gnu.org/licenses for a complete copy of the license. --
21 -- GNAT was originally developed by the GNAT team at New York University. --
22 -- Extensive contributions were provided by Ada Core Technologies Inc. --
24 ------------------------------------------------------------------------------
26 -- Routines used in Chapter 9 for the expansion of dispatching triggers in
27 -- select statements (Ada 2005: AI-345)
29 with Types; use Types;
33 function Build_Abort_Block
35 Abr_Blk_Ent : Entity_Id;
36 Cln_Blk_Ent : Entity_Id;
37 Blk : Node_Id) return Node_Id;
42 -- when Abort_Signal => Abort_Undefer / null;
44 -- Abr_Blk_Ent is the name of the generated block, Cln_Blk_Ent is the name
45 -- of the encapsulated cleanup block, Blk is the actual block name.
46 -- The exception handler code is built by Build_Abort_Block_Handler.
48 function Build_Abort_Block_Handler
49 (Loc : Source_Ptr) return Node_Id;
50 -- Generate if front-end exception:
53 -- or if back-end exception:
56 -- This is an exception handler to stop propagation of aborts, without
57 -- modifying the deferal level.
61 Decls : List_Id) return Entity_Id;
63 -- B : Boolean := False;
64 -- Append the object declaration to the list and return its defining
69 Decls : List_Id) return Entity_Id;
71 -- C : Ada.Tags.Prim_Op_Kind;
72 -- Append the object declaration to the list and return its defining
75 function Build_Cleanup_Block
79 Clean_Ent : Entity_Id) return Node_Id;
82 -- procedure _clean is
91 -- Blk_Ent is the name of the generated block, Stmts is the list of
92 -- encapsulated statements and Clean_Ent is the parameter to the
98 Obj : Entity_Id) return Entity_Id;
100 -- K : Ada.Tags.Tagged_Kind :=
101 -- Ada.Tags.Get_Tagged_Kind (Ada.Tags.Tag (Obj));
102 -- where Obj is the pointer to a secondary table. Append the object
103 -- declaration to the list and return its defining identifier.
107 Decls : List_Id) return Entity_Id;
110 -- Append the object declaration to the list and return its defining
113 function Build_S_Assignment
117 Call_Ent : Entity_Id) return Node_Id;
119 -- S := Ada.Tags.Get_Offset_Index (
120 -- Ada.Tags.Tag (Obj), DT_Position (Call_Ent));
121 -- where Obj is the pointer to a secondary table, Call_Ent is the entity
122 -- of the dispatching call name. Return the generated assignment.