-- --
-- S p e c --
-- --
--- Copyright (C) 1992-2000 Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2005, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
-- for more details. You should have received a copy of the GNU General --
-- Public License distributed with GNAT; see file COPYING. If not, write --
--- to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, --
--- MA 02111-1307, USA. --
+-- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, --
+-- Boston, MA 02110-1301, USA. --
-- --
-- As a special exception, if other files instantiate generics from this --
-- unit, or you link this unit with other files to produce an executable, --
Node2 : Node_Id;
Node3 : Node_Id;
Node4 : Node_Id;
- Node5 : Node_Id)
- return List_Id;
+ Node5 : Node_Id) return List_Id;
-- Build a new list initially containing the five given nodes
function New_List
Node3 : Node_Id;
Node4 : Node_Id;
Node5 : Node_Id;
- Node6 : Node_Id)
- return List_Id;
- -- Build a new list initially containing the five given nodes
+ Node6 : Node_Id) return List_Id;
+ -- Build a new list initially containing the six given nodes
function New_Copy_List (List : List_Id) return List_Id;
-- Creates a new list containing copies (made with Atree.New_Copy) of every
function Prev (Node : Node_Id) return Node_Id;
pragma Inline (Prev);
- -- This function returns the previous node on a node list list, or Empty if
- -- Node is the first element of the node list. The argument must be a
- -- member of a node list. Note that the implementation does not maintain
- -- back pointers, so this function potentially requires traversal of the
- -- entire list, or more accurately of the part of the list preceding Node.
+ -- This function returns the previous node on a node list list, or Empty
+ -- if Node is the first element of the node list. The argument must be
+ -- a member of a node list. Note: the implementation does maintain back
+ -- pointers, so this function executes quickly in constant time.
function Pick (List : List_Id; Index : Pos) return Node_Id;
-- Given a list, picks out the Index'th entry (1 = first entry). The
-- This function returns the previous node on a node list, skipping any
-- pragmas. If Node is the first element of the list, or if the only
-- elements preceding it are pragmas, then Empty is returned. The
- -- argument must be a member of a node list. Like Prev, this function
- -- may require expensive traversal of the head section of the list.
+ -- argument must be a member of a node list. Note: the implementation
+ -- does maintain back pointers, so this function executes quickly in
+ -- constant time.
procedure Prev_Non_Pragma (Node : in out Node_Id);
pragma Inline (Prev_Non_Pragma);
-- List is reset to be the empty node list.
procedure Prepend (Node : Node_Id; To : List_Id);
- pragma Inline (Prepend);
-- Prepends Node at the start of node list To. Node must be a non-empty
-- node that is not already a member of a node list, and To must be a
-- node list. An attempt to prepend an error node is ignored without
-- is empty, then Empty is returned.
function Remove_Next (Node : Node_Id) return Node_Id;
- pragma Inline (Remove_Next);
-- Removes the item immediately following the given node, and returns it
-- as the result. If Node is the last element of the list, then Empty is
-- returned. Node must be a member of a list. Unlike Remove, Remove_Next
-- Called to lock tables before back end is called
procedure Tree_Read;
- -- Initializes internal tables from current tree file using Tree_Read.
- -- Note that Initialize should not be called if Tree_Read is used.
- -- Tree_Read includes all necessary initialization.
+ -- Initializes internal tables from current tree file using the relevant
+ -- Table.Tree_Read routines. Note that Initialize should not be called if
+ -- Tree_Read is used. Tree_Read includes all necessary initialization.
procedure Tree_Write;
- -- Writes out internal tables to current tree file using Tree_Write
+ -- Writes out internal tables to current tree file using the relevant
+ -- Table.Tree_Write routines.
function Parent (List : List_Id) return Node_Id;
pragma Inline (Parent);