2010-09-09 Tristan Gingold <gingold@adacore.com>
- * gnatcmd.adb, vms_conv.ads, vms_help.adb, vms_cmds.ads: Extract
- Command_Type from vms_conv.ads.
+ * gnatcmd.adb, vms_conv.ads: Extract Command_Type.
2010-09-09 Eric Botcazou <ebotcazou@adacore.com>
-- --
-- B o d y --
-- --
--- Copyright (C) 2004-2009, Free Software Foundation, Inc. --
+-- Copyright (C) 2004-2010, 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- --
if Container.Busy > 0 then
raise Program_Error with
- "attempt to tamper with elements (list is busy)";
+ "attempt to tamper with cursors (list is busy)";
end if;
while Container.Length > 1 loop
if Container.Busy > 0 then
raise Program_Error with
- "attempt to tamper with elements (list is busy)";
+ "attempt to tamper with cursors (list is busy)";
end if;
for Index in 1 .. Count loop
if Container.Busy > 0 then
raise Program_Error with
- "attempt to tamper with elements (list is busy)";
+ "attempt to tamper with cursors (list is busy)";
end if;
for I in 1 .. Count loop
if Container.Busy > 0 then
raise Program_Error with
- "attempt to tamper with elements (list is busy)";
+ "attempt to tamper with cursors (list is busy)";
end if;
for I in 1 .. Count loop
if Target.Busy > 0 then
raise Program_Error with
- "attempt to tamper with elements of Target (list is busy)";
+ "attempt to tamper with cursors of Target (list is busy)";
end if;
if Source.Busy > 0 then
raise Program_Error with
- "attempt to tamper with elements of Source (list is busy)";
+ "attempt to tamper with cursors of Source (list is busy)";
end if;
LI := First (Target);
if Container.Busy > 0 then
raise Program_Error with
- "attempt to tamper with elements (list is busy)";
+ "attempt to tamper with cursors (list is busy)";
end if;
Sort (Front => null, Back => null);
if Container.Busy > 0 then
raise Program_Error with
- "attempt to tamper with elements (list is busy)";
+ "attempt to tamper with cursors (list is busy)";
end if;
New_Node := new Node_Type'(New_Item, null, null);
if Container.Busy > 0 then
raise Program_Error with
- "attempt to tamper with elements (list is busy)";
+ "attempt to tamper with cursors (list is busy)";
end if;
New_Node := new Node_Type;
if Source.Busy > 0 then
raise Program_Error with
- "attempt to tamper with elements of Source (list is busy)";
+ "attempt to tamper with cursors of Source (list is busy)";
end if;
Clear (Target);
if Container.Lock > 0 then
raise Program_Error with
- "attempt to tamper with cursors (list is locked)";
+ "attempt to tamper with elements (list is locked)";
end if;
pragma Assert (Vet (Position), "bad cursor in Replace_Element");
if Container.Busy > 0 then
raise Program_Error with
- "attempt to tamper with elements (list is busy)";
+ "attempt to tamper with cursors (list is busy)";
end if;
Container.First := J;
if Target.Busy > 0 then
raise Program_Error with
- "attempt to tamper with elements of Target (list is busy)";
+ "attempt to tamper with cursors of Target (list is busy)";
end if;
if Source.Busy > 0 then
raise Program_Error with
- "attempt to tamper with elements of Source (list is busy)";
+ "attempt to tamper with cursors of Source (list is busy)";
end if;
if Target.Length = 0 then
if Container.Busy > 0 then
raise Program_Error with
- "attempt to tamper with elements (list is busy)";
+ "attempt to tamper with cursors (list is busy)";
end if;
if Before.Node = null then
if Target.Busy > 0 then
raise Program_Error with
- "attempt to tamper with elements of Target (list is busy)";
+ "attempt to tamper with cursors of Target (list is busy)";
end if;
if Source.Busy > 0 then
raise Program_Error with
- "attempt to tamper with elements of Source (list is busy)";
+ "attempt to tamper with cursors of Source (list is busy)";
end if;
if Position.Node = Source.First then
if Container.Lock > 0 then
raise Program_Error with
- "attempt to tamper with cursors (list is locked)";
+ "attempt to tamper with elements (list is locked)";
end if;
pragma Assert (Vet (I), "bad I cursor in Swap");
if Container.Busy > 0 then
raise Program_Error with
- "attempt to tamper with elements (list is busy)";
+ "attempt to tamper with cursors (list is busy)";
end if;
pragma Assert (Vet (I), "bad I cursor in Swap_Links");
-- --
-- B o d y --
-- --
--- Copyright (C) 2004-2009, Free Software Foundation, Inc. --
+-- Copyright (C) 2004-2010, 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- --
if Equivalent_Keys (Key, X) then
if HT.Busy > 0 then
raise Program_Error with
- "attempt to tamper with elements (container is busy)";
+ "attempt to tamper with cursors (container is busy)";
end if;
HT.Buckets (Indx) := Next (X);
HT.Length := HT.Length - 1;
if Equivalent_Keys (Key, X) then
if HT.Busy > 0 then
raise Program_Error with
- "attempt to tamper with elements (container is busy)";
+ "attempt to tamper with cursors (container is busy)";
end if;
Set_Next (Node => Prev, Next => Next (X));
HT.Length := HT.Length - 1;
if B = null then
if HT.Busy > 0 then
raise Program_Error with
- "attempt to tamper with elements (container is busy)";
+ "attempt to tamper with cursors (container is busy)";
end if;
if HT.Length = Count_Type'Last then
if HT.Busy > 0 then
raise Program_Error with
- "attempt to tamper with elements (container is busy)";
+ "attempt to tamper with cursors (container is busy)";
end if;
if HT.Length = Count_Type'Last then
if HT.Lock > 0 then
raise Program_Error with
- "attempt to tamper with cursors (container is locked)";
+ "attempt to tamper with elements (container is locked)";
end if;
-- We can change a node's key to Key (that's what Assign is for), but
if HT.Lock > 0 then
raise Program_Error with
- "attempt to tamper with cursors (container is locked)";
+ "attempt to tamper with elements (container is locked)";
end if;
Assign (Node, Key);
if HT.Busy > 0 then
raise Program_Error with
- "attempt to tamper with elements (container is busy)";
+ "attempt to tamper with cursors (container is busy)";
end if;
-- Do the assignment first, before moving the node, so that if Assign
-- --
-- B o d y --
-- --
--- Copyright (C) 2004-2009, Free Software Foundation, Inc. --
+-- Copyright (C) 2004-2010, 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- --
begin
if HT.Busy > 0 then
raise Program_Error with
- "attempt to tamper with elements (container is busy)";
+ "attempt to tamper with cursors (container is busy)";
end if;
while HT.Length > 0 loop
if Source.Busy > 0 then
raise Program_Error with
- "attempt to tamper with elements (container is busy)";
+ "attempt to tamper with cursors (container is busy)";
end if;
Clear (Target);
if HT.Busy > 0 then
raise Program_Error with
- "attempt to tamper with elements (container is busy)";
+ "attempt to tamper with cursors (container is busy)";
end if;
Rehash : declare
-- --
-- B o d y --
-- --
--- Copyright (C) 2004-2009, Free Software Foundation, Inc. --
+-- Copyright (C) 2004-2010, 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- --
if Container.Busy > 0 then
raise Program_Error with
- "attempt to tamper with elements (list is busy)";
+ "attempt to tamper with cursors (list is busy)";
end if;
while Container.Length > 1 loop
if Container.Busy > 0 then
raise Program_Error with
- "attempt to tamper with elements (list is busy)";
+ "attempt to tamper with cursors (list is busy)";
end if;
for Index in 1 .. Count loop
if Container.Busy > 0 then
raise Program_Error with
- "attempt to tamper with elements (list is busy)";
+ "attempt to tamper with cursors (list is busy)";
end if;
for I in 1 .. Count loop
if Container.Busy > 0 then
raise Program_Error with
- "attempt to tamper with elements (list is busy)";
+ "attempt to tamper with cursors (list is busy)";
end if;
for I in 1 .. Count loop
if Target.Busy > 0 then
raise Program_Error with
- "attempt to tamper with elements of Target (list is busy)";
+ "attempt to tamper with cursors of Target (list is busy)";
end if;
if Source.Busy > 0 then
raise Program_Error with
- "attempt to tamper with elements of Source (list is busy)";
+ "attempt to tamper with cursors of Source (list is busy)";
end if;
LI := First (Target);
if Container.Busy > 0 then
raise Program_Error with
- "attempt to tamper with elements (list is busy)";
+ "attempt to tamper with cursors (list is busy)";
end if;
Sort (Front => null, Back => null);
if Before.Container /= null then
if Before.Container /= Container'Unrestricted_Access then
raise Program_Error with
- "attempt to tamper with elements (list is busy)";
+ "attempt to tamper with cursors (list is busy)";
end if;
if Before.Node = null
if Container.Busy > 0 then
raise Program_Error with
- "attempt to tamper with elements (list is busy)";
+ "attempt to tamper with cursors (list is busy)";
end if;
declare
if Source.Busy > 0 then
raise Program_Error with
- "attempt to tamper with elements of Source (list is busy)";
+ "attempt to tamper with cursors of Source (list is busy)";
end if;
Clear (Target);
if Container.Lock > 0 then
raise Program_Error with
- "attempt to tamper with cursors (list is locked)";
+ "attempt to tamper with elements (list is locked)";
end if;
if Position.Node.Element = null then
if Container.Busy > 0 then
raise Program_Error with
- "attempt to tamper with elements (list is busy)";
+ "attempt to tamper with cursors (list is busy)";
end if;
Container.First := J;
if Target.Busy > 0 then
raise Program_Error with
- "attempt to tamper with elements of Target (list is busy)";
+ "attempt to tamper with cursors of Target (list is busy)";
end if;
if Source.Busy > 0 then
raise Program_Error with
- "attempt to tamper with elements of Source (list is busy)";
+ "attempt to tamper with cursors of Source (list is busy)";
end if;
if Target.Length = 0 then
if Container.Busy > 0 then
raise Program_Error with
- "attempt to tamper with elements (list is busy)";
+ "attempt to tamper with cursors (list is busy)";
end if;
if Before.Node = null then
if Target.Busy > 0 then
raise Program_Error with
- "attempt to tamper with elements of Target (list is busy)";
+ "attempt to tamper with cursors of Target (list is busy)";
end if;
if Source.Busy > 0 then
raise Program_Error with
- "attempt to tamper with elements of Source (list is busy)";
+ "attempt to tamper with cursors of Source (list is busy)";
end if;
if Position.Node = Source.First then
if Container.Lock > 0 then
raise Program_Error with
- "attempt to tamper with cursors (list is locked)";
+ "attempt to tamper with elements (list is locked)";
end if;
pragma Assert (Vet (I), "bad I cursor in Swap");
if Container.Busy > 0 then
raise Program_Error with
- "attempt to tamper with elements (list is busy)";
+ "attempt to tamper with cursors (list is busy)";
end if;
pragma Assert (Vet (I), "bad I cursor in Swap_Links");
if Container.HT.Busy > 0 then
raise Program_Error with
- "Delete attempted to tamper with elements (map is busy)";
+ "Delete attempted to tamper with cursors (map is busy)";
end if;
pragma Assert (Vet (Position), "bad cursor in Delete");
if not Inserted then
if Container.HT.Lock > 0 then
raise Program_Error with
- "Include attempted to tamper with cursors (map is locked)";
+ "Include attempted to tamper with elements (map is locked)";
end if;
K := Position.Node.Key;
if Container.HT.Lock > 0 then
raise Program_Error with
- "Replace attempted to tamper with cursors (map is locked)";
+ "Replace attempted to tamper with elements (map is locked)";
end if;
K := Node.Key;
if Position.Container.HT.Lock > 0 then
raise Program_Error with
- "Replace_Element attempted to tamper with cursors (map is locked)";
+ "Replace_Element attempted to tamper with elements (map is locked)";
end if;
pragma Assert (Vet (Position), "bad cursor in Replace_Element");
-- --
-- B o d y --
-- --
--- Copyright (C) 2004-2009, Free Software Foundation, Inc. --
+-- Copyright (C) 2004-2010, 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- --
if Container.HT.Busy > 0 then
raise Program_Error with
- "attempt to tamper with elements (set is busy)";
+ "attempt to tamper with cursors (set is busy)";
end if;
pragma Assert (Vet (Position), "Position cursor is bad");
if Target.HT.Busy > 0 then
raise Program_Error with
- "attempt to tamper with elements (set is busy)";
+ "attempt to tamper with cursors (set is busy)";
end if;
if Source.HT.Length < Target.HT.Length then
if not Inserted then
if Container.HT.Lock > 0 then
raise Program_Error with
- "attempt to tamper with cursors (set is locked)";
+ "attempt to tamper with elements (set is locked)";
end if;
X := Position.Node.Element;
if Target.HT.Busy > 0 then
raise Program_Error with
- "attempt to tamper with elements (set is busy)";
+ "attempt to tamper with cursors (set is busy)";
end if;
Tgt_Node := HT_Ops.First (Target.HT);
if Container.HT.Lock > 0 then
raise Program_Error with
- "attempt to tamper with cursors (set is locked)";
+ "attempt to tamper with elements (set is locked)";
end if;
X := Node.Element;
if Target.HT.Busy > 0 then
raise Program_Error with
- "attempt to tamper with elements (set is busy)";
+ "attempt to tamper with cursors (set is busy)";
end if;
declare
if Target.HT.Busy > 0 then
raise Program_Error with
- "attempt to tamper with elements (set is busy)";
+ "attempt to tamper with cursors (set is busy)";
end if;
declare
-- --
-- B o d y --
-- --
--- Copyright (C) 2004-2009, Free Software Foundation, Inc. --
+-- Copyright (C) 2004-2010, 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- --
if not Inserted then
if Container.Tree.Lock > 0 then
raise Program_Error with
- "attempt to tamper with cursors (map is locked)";
+ "attempt to tamper with elements (map is locked)";
end if;
K := Position.Node.Key;
if Container.Tree.Lock > 0 then
raise Program_Error with
- "attempt to tamper with cursors (map is locked)";
+ "attempt to tamper with elements (map is locked)";
end if;
K := Node.Key;
if Container.Tree.Lock > 0 then
raise Program_Error with
- "attempt to tamper with cursors (map is locked)";
+ "attempt to tamper with elements (map is locked)";
end if;
pragma Assert (Vet (Container.Tree, Position.Node),
-- --
-- B o d y --
-- --
--- Copyright (C) 2004-2009, Free Software Foundation, Inc. --
+-- Copyright (C) 2004-2010, 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- --
else
if Tree.Lock > 0 then
raise Program_Error with
- "attempt to tamper with cursors (set is locked)";
+ "attempt to tamper with elements (set is locked)";
end if;
declare
-- --
-- B o d y --
-- --
--- Copyright (C) 2004-2009, Free Software Foundation, Inc. --
+-- Copyright (C) 2004-2010, 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- --
if not Inserted then
if Container.Tree.Lock > 0 then
raise Program_Error with
- "attempt to tamper with cursors (set is locked)";
+ "attempt to tamper with elements (set is locked)";
end if;
X := Position.Node.Element;
if Container.Tree.Lock > 0 then
raise Program_Error with
- "attempt to tamper with cursors (set is locked)";
+ "attempt to tamper with elements (set is locked)";
end if;
X := Node.Element;
X : Element_Access := Node.Element;
- -- Start of processing for Insert
+ -- Start of processing for Replace_Element
begin
if Item < Node.Element.all
else
if Tree.Lock > 0 then
raise Program_Error with
- "attempt to tamper with cursors (set is locked)";
+ "attempt to tamper with elements (set is locked)";
end if;
Node.Element := new Element_Type'(Item);
if Hint = Node then
if Tree.Lock > 0 then
raise Program_Error with
- "attempt to tamper with cursors (set is locked)";
+ "attempt to tamper with elements (set is locked)";
end if;
Node.Element := new Element_Type'(Item);
if Container.HT.Busy > 0 then
raise Program_Error with
- "Delete attempted to tamper with elements (map is busy)";
+ "Delete attempted to tamper with cursors (map is busy)";
end if;
pragma Assert (Vet (Position), "bad cursor in Delete");
if not Inserted then
if Container.HT.Lock > 0 then
raise Program_Error with
- "Include attempted to tamper with cursors (map is locked)";
+ "Include attempted to tamper with elements (map is locked)";
end if;
Position.Node.Key := Key;
if Container.HT.Lock > 0 then
raise Program_Error with
- "Replace attempted to tamper with cursors (map is locked)";
+ "Replace attempted to tamper with elements (map is locked)";
end if;
Node.Key := Key;
if Position.Container.HT.Lock > 0 then
raise Program_Error with
- "Replace_Element attempted to tamper with cursors (map is locked)";
+ "Replace_Element attempted to tamper with elements (map is locked)";
end if;
pragma Assert (Vet (Position), "bad cursor in Replace_Element");
-- --
-- B o d y --
-- --
--- Copyright (C) 2004-2009, Free Software Foundation, Inc. --
+-- Copyright (C) 2004-2010, 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- --
if Container.HT.Busy > 0 then
raise Program_Error with
- "attempt to tamper with elements (set is busy)";
+ "attempt to tamper with cursors (set is busy)";
end if;
pragma Assert (Vet (Position), "bad cursor in Delete");
if Target.HT.Busy > 0 then
raise Program_Error with
- "attempt to tamper with elements (set is busy)";
+ "attempt to tamper with cursors (set is busy)";
end if;
if Source.HT.Length < Target.HT.Length then
if not Inserted then
if Container.HT.Lock > 0 then
raise Program_Error with
- "attempt to tamper with cursors (set is locked)";
+ "attempt to tamper with elements (set is locked)";
end if;
Position.Node.Element := New_Item;
if Target.HT.Busy > 0 then
raise Program_Error with
- "attempt to tamper with elements (set is busy)";
+ "attempt to tamper with cursors (set is busy)";
end if;
Tgt_Node := HT_Ops.First (Target.HT);
if Container.HT.Lock > 0 then
raise Program_Error with
- "attempt to tamper with cursors (set is locked)";
+ "attempt to tamper with elements (set is locked)";
end if;
Node.Element := New_Item;
if Target.HT.Busy > 0 then
raise Program_Error with
- "attempt to tamper with elements (set is busy)";
+ "attempt to tamper with cursors (set is busy)";
end if;
declare
if Target.HT.Busy > 0 then
raise Program_Error with
- "attempt to tamper with elements (set is busy)";
+ "attempt to tamper with cursors (set is busy)";
end if;
declare
begin
if Container.Busy > 0 then
raise Program_Error with
- "attempt to tamper with elements (vector is busy)";
+ "attempt to tamper with cursors (vector is busy)";
end if;
while Container.Last >= Index_Type'First loop
if Container.Busy > 0 then
raise Program_Error with
- "attempt to tamper with elements (vector is busy)";
+ "attempt to tamper with cursors (vector is busy)";
end if;
-- We first calculate what's available for deletion starting at
if Container.Busy > 0 then
raise Program_Error with
- "attempt to tamper with elements (vector is busy)";
+ "attempt to tamper with cursors (vector is busy)";
end if;
-- Elements in an indefinite vector are allocated, so we must iterate
if Source.Busy > 0 then
raise Program_Error with
- "attempt to tamper with elements (vector is busy)";
+ "attempt to tamper with cursors (vector is busy)";
end if;
I := Target.Last; -- original value (before Set_Length)
if Container.Lock > 0 then
raise Program_Error with
- "attempt to tamper with cursors (vector is locked)";
+ "attempt to tamper with elements (vector is locked)";
end if;
Sort (Container.Elements.EA (Index_Type'First .. Container.Last));
if Container.Busy > 0 then
raise Program_Error with
- "attempt to tamper with elements (vector is busy)";
+ "attempt to tamper with cursors (vector is busy)";
end if;
if New_Length <= Container.Elements.EA'Length then
if Container.Busy > 0 then
raise Program_Error with
- "attempt to tamper with elements (vector is busy)";
+ "attempt to tamper with cursors (vector is busy)";
end if;
if New_Length <= Container.Elements.EA'Length then
if Source.Busy > 0 then
raise Program_Error with
- "attempt to tamper with elements (Source is busy)";
+ "attempt to tamper with cursors (Source is busy)";
end if;
Clear (Target); -- Checks busy-bit
if Container.Lock > 0 then
raise Program_Error with
- "attempt to tamper with cursors (vector is locked)";
+ "attempt to tamper with elements (vector is locked)";
end if;
declare
if Container.Lock > 0 then
raise Program_Error with
- "attempt to tamper with cursors (vector is locked)";
+ "attempt to tamper with elements (vector is locked)";
end if;
declare
if Container.Busy > 0 then
raise Program_Error with
- "attempt to tamper with elements (vector is busy)";
+ "attempt to tamper with cursors (vector is busy)";
end if;
declare
if Container.Busy > 0 then
raise Program_Error with
- "attempt to tamper with elements (vector is busy)";
+ "attempt to tamper with cursors (vector is busy)";
end if;
declare
if Container.Busy > 0 then
raise Program_Error with
- "attempt to tamper with elements (vector is busy)";
+ "attempt to tamper with cursors (vector is busy)";
end if;
-- We now allocate a new internal array, having a length different from
if Container.Lock > 0 then
raise Program_Error with
- "attempt to tamper with cursors (vector is locked)";
+ "attempt to tamper with elements (vector is locked)";
end if;
declare
if Container.Lock > 0 then
raise Program_Error with
- "attempt to tamper with cursors (vector is locked)";
+ "attempt to tamper with elements (vector is locked)";
end if;
declare
begin
if Container.Busy > 0 then
raise Program_Error with
- "attempt to tamper with elements (vector is busy)";
+ "attempt to tamper with cursors (vector is busy)";
end if;
Container.Last := No_Index;
if Container.Busy > 0 then
raise Program_Error with
- "attempt to tamper with elements (vector is busy)";
+ "attempt to tamper with cursors (vector is busy)";
end if;
-- We first calculate what's available for deletion starting at
if Container.Busy > 0 then
raise Program_Error with
- "attempt to tamper with elements (vector is busy)";
+ "attempt to tamper with cursors (vector is busy)";
end if;
-- There is no restriction on how large Count can be when deleting
begin
if Container.Busy > 0 then
raise Program_Error with
- "attempt to tamper with elements (vector is busy)";
+ "attempt to tamper with cursors (vector is busy)";
end if;
Container.Elements := null;
if Source.Busy > 0 then
raise Program_Error with
- "attempt to tamper with elements (vector is busy)";
+ "attempt to tamper with cursors (vector is busy)";
end if;
Target.Set_Length (Length (Target) + Length (Source));
if Container.Lock > 0 then
raise Program_Error with
- "attempt to tamper with cursors (vector is locked)";
+ "attempt to tamper with elements (vector is locked)";
end if;
Sort (Container.Elements.EA (Index_Type'First .. Container.Last));
if Container.Busy > 0 then
raise Program_Error with
- "attempt to tamper with elements (vector is busy)";
+ "attempt to tamper with cursors (vector is busy)";
end if;
-- An internal array has already been allocated, so we must determine
if Container.Busy > 0 then
raise Program_Error with
- "attempt to tamper with elements (vector is busy)";
+ "attempt to tamper with cursors (vector is busy)";
end if;
-- An internal array has already been allocated, so we must determine
if Target.Busy > 0 then
raise Program_Error with
- "attempt to tamper with elements (Target is busy)";
+ "attempt to tamper with cursors (Target is busy)";
end if;
if Source.Busy > 0 then
raise Program_Error with
- "attempt to tamper with elements (Source is busy)";
+ "attempt to tamper with cursors (Source is busy)";
end if;
declare
if Container.Lock > 0 then
raise Program_Error with
- "attempt to tamper with cursors (vector is locked)";
+ "attempt to tamper with elements (vector is locked)";
end if;
Container.Elements.EA (Index) := New_Item;
if Container.Lock > 0 then
raise Program_Error with
- "attempt to tamper with cursors (vector is locked)";
+ "attempt to tamper with elements (vector is locked)";
end if;
Container.Elements.EA (Position.Index) := New_Item;
if Container.Busy > 0 then
raise Program_Error with
- "attempt to tamper with elements (vector is busy)";
+ "attempt to tamper with cursors (vector is busy)";
end if;
declare
if Container.Busy > 0 then
raise Program_Error with
- "attempt to tamper with elements (vector is busy)";
+ "attempt to tamper with cursors (vector is busy)";
end if;
declare
if Container.Busy > 0 then
raise Program_Error with
- "attempt to tamper with elements (vector is busy)";
+ "attempt to tamper with cursors (vector is busy)";
end if;
-- We now allocate a new internal array, having a length different from
if Container.Lock > 0 then
raise Program_Error with
- "attempt to tamper with cursors (vector is locked)";
+ "attempt to tamper with elements (vector is locked)";
end if;
declare
if Container.Lock > 0 then
raise Program_Error with
- "attempt to tamper with cursors (vector is locked)";
+ "attempt to tamper with elements (vector is locked)";
end if;
declare
-- --
-- B o d y --
-- --
--- Copyright (C) 2004-2009, Free Software Foundation, Inc. --
+-- Copyright (C) 2004-2010, 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- --
if not Inserted then
if Container.Tree.Lock > 0 then
raise Program_Error with
- "attempt to tamper with cursors (map is locked)";
+ "attempt to tamper with elements (map is locked)";
end if;
Position.Node.Key := Key;
if Container.Tree.Lock > 0 then
raise Program_Error with
- "attempt to tamper with cursors (map is locked)";
+ "attempt to tamper with elements (map is locked)";
end if;
Node.Key := Key;
if Container.Tree.Lock > 0 then
raise Program_Error with
- "attempt to tamper with cursors (map is locked)";
+ "attempt to tamper with elements (map is locked)";
end if;
pragma Assert (Vet (Container.Tree, Position.Node),
-- --
-- B o d y --
-- --
--- Copyright (C) 2004-2009, Free Software Foundation, Inc. --
+-- Copyright (C) 2004-2010, 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- --
else
if Tree.Lock > 0 then
raise Program_Error with
- "attempt to tamper with cursors (set is locked)";
+ "attempt to tamper with elements (set is locked)";
end if;
Node.Element := Item;
-- --
-- B o d y --
-- --
--- Copyright (C) 2004-2009, Free Software Foundation, Inc. --
+-- Copyright (C) 2004-2010, 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- --
if not Inserted then
if Container.Tree.Lock > 0 then
raise Program_Error with
- "attempt to tamper with cursors (set is locked)";
+ "attempt to tamper with elements (set is locked)";
end if;
Position.Node.Element := New_Item;
if Container.Tree.Lock > 0 then
raise Program_Error with
- "attempt to tamper with cursors (set is locked)";
+ "attempt to tamper with elements (set is locked)";
end if;
Node.Element := New_Item;
Result : Node_Access;
Inserted : Boolean;
- -- Start of processing for Insert
+ -- Start of processing for Replace_Element
begin
if Item < Node.Element
else
if Tree.Lock > 0 then
raise Program_Error with
- "attempt to tamper with cursors (set is locked)";
+ "attempt to tamper with elements (set is locked)";
end if;
Node.Element := Item;
if Hint = Node then
if Tree.Lock > 0 then
raise Program_Error with
- "attempt to tamper with cursors (set is locked)";
+ "attempt to tamper with elements (set is locked)";
end if;
Node.Element := Item;
Append_To (Extra_Actuals,
Make_Parameter_Association (Loc,
- Explicit_Actual_Parameter => Expr,
- Selector_Name =>
- Make_Identifier (Loc, Chars (EF))));
+ Selector_Name => Make_Identifier (Loc, Chars (EF)),
+ Explicit_Actual_Parameter => Expr));
Analyze_And_Resolve (Expr, Etype (EF));
Prev_Orig := Prev;
end if;
- -- Ada 2005 (AI-251): Thunks must propagate the extra actuals
- -- of accessibility levels.
+ -- Ada 2005 (AI-251): Thunks must propagate the extra actuals of
+ -- accessibility levels.
if Ekind (Current_Scope) in Subprogram_Kind
and then Is_Thunk (Current_Scope)
Extra_Accessibility (Formal));
-- No other cases of attributes returning access
- -- values that can be passed to access parameters
+ -- values that can be passed to access parameters.
when others =>
raise Program_Error;
-- For CPP types there is no need to build the dispatch tables since
-- they are imported from the C++ side. If the CPP type has an IP
-- then we declare now the variable that will store the copy of the
- -- C++ tag.
+ -- C++ tag. If the CPP type is an interface, we need the variable as
+ -- well, because it becomes the pointer to the corresponding secondary
+ -- table.
if Is_CPP_Class (Typ) then
- if Has_CPP_Constructors (Typ) then
+ if Has_CPP_Constructors (Typ)
+ or else Is_Interface (Typ)
+ then
Append_To (Result,
Make_Object_Declaration (Loc,
Defining_Identifier => DT_Ptr,
@c o
@c G N A T _ U G N o
@c o
-@c GNAT is maintained by Ada Core Technologies Inc (http://www.gnat.com). o
+@c Copyright (C) 1992-2010, AdaCore o
@c o
@c oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo
@item -fno-inline-functions
@cindex @option{-fno-inline-functions} (@command{gcc})
-Suppresses automatic inlining of simple subprograms, which is enabled
+Suppresses automatic inlining of subprograms, which is enabled
if @option{-O3} is used.
@item -fno-inline-small-functions
the slowest compilation time.
@item ^-O3^/OPTIMIZE=INLINING^
-Full optimization as in @option{-O2},
-and also attempts automatic inlining of small
-subprograms within a unit (@pxref{Inlining of Subprograms}).
+Full optimization as in @option{-O2};
+also uses more aggressive automatic inlining of subprograms within a unit (@pxref{Inlining of Subprograms}) and attemps to vectorize loops.
@item ^-Os^/OPTIMIZE=SPACE^
-Optimize space usage of resulting program.
+Optimize space usage (code and data) of resulting program.
@end table
@noindent
Note regarding the use of @option{-O3}: The use of this optimization level
is generally discouraged with GNAT, since it often results in larger
-executables which run more slowly. See further discussion of this point
+executables which may run more slowly. See further discussion of this point
in @ref{Inlining of Subprograms}.
@node Debugging Optimized Code
@item
@cindex pragma Inline
@findex Inline
-Either @code{pragma Inline} applies to the subprogram, or it is local
-to the unit and called once from within it, or it is small and automatic
-inlining (optimization level @option{-O3}) is specified.
+Either @code{pragma Inline} applies to the subprogram, or it is local to
+the unit and called once from within it, or it is small and optimization
+level @option{-O2} is specified, or automatic inlining (optimization level
+@option{-O3}) is specified.
@end itemize
@noindent
@cindex @option{-fno-inline-functions} (@command{gcc})
Note: The @option{-fno-inline-functions} switch can be used to prevent
-automatic inlining of small subprograms if @option{-O3} is used.
+automatic inlining of subprograms if @option{-O3} is used.
+
+@cindex @option{-fno-inline-small-functions} (@command{gcc})
+Note: The @option{-fno-inline-small-functions} switch can be used to prevent
+automatic inlining of small subprograms if @option{-O2} is used.
@cindex @option{-fno-inline-functions-called-once} (@command{gcc})
Note: The @option{-fno-inline-functions-called-once} switch
with GNAT.OS_Lib; use GNAT.OS_Lib;
with VMS_Conv; use VMS_Conv;
+with VMS_Cmds; use VMS_Cmds;
procedure GNATCmd is
Project_Node_Tree : Project_Node_Tree_Ref;
@b{end} Builder;
@b{package} Compiler @b{is} --<<< for the compiler
- @b{end} Builder;
+ @b{end} Compiler;
@b{package} Binder @b{is} --<<< for the binder
- @b{end} Builder;
+ @b{end} Binder;
@b{package} Linker @b{is} --<<< for the linker
- @b{end} Builder;
+ @b{end} Linker;
@end smallexample
@noindent
-- --
-- S p e c --
-- --
--- Copyright (C) 2003-2008, Free Software Foundation, Inc. --
+-- Copyright (C) 2003-2010, 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- --
with Table;
with VMS_Data; use VMS_Data;
+with VMS_Cmds; use VMS_Cmds;
with GNAT.OS_Lib; use GNAT.OS_Lib;
type Parameter_Array is array (Natural range <>) of Parameter_Type;
type Parameter_Ref is access all Parameter_Array;
- type Command_Type is
- (Bind,
- Chop,
- Clean,
- Compile,
- Check,
- Sync,
- Elim,
- Find,
- Krunch,
- Link,
- List,
- Make,
- Metric,
- Name,
- Preprocess,
- Pretty,
- Shared,
- Stack,
- Stub,
- Xref,
- Undefined);
-
type Alternate_Command is (Comp, Ls, Kr, Pp, Prep);
-- Alternate command label for non VMS system use