+2011-08-01 Matthew Heaney <heaney@adacore.com>
+
+ * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
+ of node.
+
+2011-08-01 Pascal Obry <obry@adacore.com>
+
+ * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
+ reformatting.
+
2011-08-01 Ed Schonberg <schonberg@adacore.com>
* sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
Set_Right (N (Parent (N (Z))), Y);
end if;
- Set_Left (N (Y), Z);
+ Set_Left (N (Y), Left (N (Z)));
Set_Parent (N (Left (N (Y))), Y);
Set_Right (N (Y), Z);
Set_Parent (N (Z), Y);
DR : Shared_String_Access;
begin
- -- Bounds check.
+ -- Bounds check
if Index <= SR.Last then
DR : Shared_Wide_String_Access;
begin
- -- Result is an empty string, reuse shared empty string.
+ -- Result is an empty string, reuse shared empty string
if DL = 0 then
Reference (Empty_Shared_Wide_String'Access);
DR := Empty_Shared_Wide_String'Access;
- -- Left string is empty, return Right string.
+ -- Left string is empty, return Rigth string
elsif LR.Last = 0 then
Reference (RR);
DR := RR;
- -- Right string is empty, return Left string.
+ -- Right string is empty, return Left string
elsif RR.Last = 0 then
Reference (LR);
DR := LR;
- -- Otherwise, allocate new shared string and fill data.
+ -- Overwise, allocate new shared string and fill data
else
DR := Allocate (LR.Last + RR.Last);
DR : Shared_Wide_String_Access;
begin
- -- Result is an empty string, reuse shared empty string.
+ -- Result is an empty string, reuse shared empty string
if DL = 0 then
Reference (Empty_Shared_Wide_String'Access);
DR := Empty_Shared_Wide_String'Access;
- -- Right is an empty string, return Left string.
+ -- Right is an empty string, return Left string
elsif Right'Length = 0 then
Reference (LR);
DR := LR;
- -- Otherwise, allocate new shared string and fill it.
+ -- Otherwise, allocate new shared string and fill it
else
DR := Allocate (DL);
DR : Shared_Wide_String_Access;
begin
- -- Result is an empty string, reuse shared one.
+ -- Result is an empty string, reuse shared one
if DL = 0 then
Reference (Empty_Shared_Wide_String'Access);
DR := Empty_Shared_Wide_String'Access;
- -- Left is empty string, return Right string.
+ -- Left is empty string, return Right string
elsif Left'Length = 0 then
Reference (RR);
DR := RR;
- -- Otherwise, allocate new shared string and fill it.
+ -- Otherwise, allocate new shared string and fill it
else
DR := Allocate (DL);
DR : Shared_Wide_String_Access;
begin
- -- Result is an empty string, reuse shared empty string.
+ -- Result is an empty string, reuse shared empty string
if Left = 0 then
Reference (Empty_Shared_Wide_String'Access);
DR := Empty_Shared_Wide_String'Access;
- -- Otherwise, allocate new shared string and fill it.
+ -- Otherwise, allocate new shared string and fill it
else
DR := Allocate (Left);
K : Positive;
begin
- -- Result is an empty string, reuse shared empty string.
+ -- Result is an empty string, reuse shared empty string
if DL = 0 then
Reference (Empty_Shared_Wide_String'Access);
DR := Empty_Shared_Wide_String'Access;
- -- Otherwise, allocate new shared string and fill it.
+ -- Otherwise, allocate new shared string and fill it
else
DR := Allocate (DL);
K : Positive;
begin
- -- Result is an empty string, reuse shared empty string.
+ -- Result is an empty string, reuse shared empty string
if DL = 0 then
Reference (Empty_Shared_Wide_String'Access);
DR := Empty_Shared_Wide_String'Access;
- -- Coefficient is one, just return string itself.
+ -- Coefficient is one, just return string itself
elsif Left = 1 then
Reference (RR);
DR := RR;
- -- Otherwise, allocate new shared string and fill it.
+ -- Otherwise, allocate new shared string and fill it
else
DR := Allocate (DL);
begin
return LR = RR or else LR.Data (1 .. LR.Last) = RR.Data (1 .. RR.Last);
- -- LR = RR means two strings shares shared string, thus they are equal.
+ -- LR = RR means two strings shares shared string, thus they are equal
end "=";
function "="
DR : Shared_Wide_String_Access;
begin
- -- Bounds check.
+ -- Bounds check
if Index <= SR.Last then
DR : Shared_Wide_Wide_String_Access;
begin
- -- Result is an empty string, reuse shared empty string.
+ -- Result is an empty string, reuse shared empty string
if DL = 0 then
Reference (Empty_Shared_Wide_Wide_String'Access);
DR := Empty_Shared_Wide_Wide_String'Access;
- -- Left string is empty, return Right string.
+ -- Left string is empty, return Rigth string
elsif LR.Last = 0 then
Reference (RR);
DR := RR;
- -- Right string is empty, return Left string.
+ -- Right string is empty, return Left string
elsif RR.Last = 0 then
Reference (LR);
DR := LR;
- -- Otherwise, allocate new shared string and fill data.
+ -- Overwise, allocate new shared string and fill data
else
DR := Allocate (LR.Last + RR.Last);
DR : Shared_Wide_Wide_String_Access;
begin
- -- Result is an empty string, reuse shared empty string.
+ -- Result is an empty string, reuse shared empty string
if DL = 0 then
Reference (Empty_Shared_Wide_Wide_String'Access);
DR := Empty_Shared_Wide_Wide_String'Access;
- -- Right is an empty string, return Left string.
+ -- Right is an empty string, return Left string
elsif Right'Length = 0 then
Reference (LR);
DR := LR;
- -- Otherwise, allocate new shared string and fill it.
+ -- Otherwise, allocate new shared string and fill it
else
DR := Allocate (DL);
DR : Shared_Wide_Wide_String_Access;
begin
- -- Result is an empty string, reuse shared one.
+ -- Result is an empty string, reuse shared one
if DL = 0 then
Reference (Empty_Shared_Wide_Wide_String'Access);
DR := Empty_Shared_Wide_Wide_String'Access;
- -- Left is empty string, return Right string.
+ -- Left is empty string, return Right string
elsif Left'Length = 0 then
Reference (RR);
DR := RR;
- -- Otherwise, allocate new shared string and fill it.
+ -- Otherwise, allocate new shared string and fill it
else
DR := Allocate (DL);
DR : Shared_Wide_Wide_String_Access;
begin
- -- Result is an empty string, reuse shared empty string.
+ -- Result is an empty string, reuse shared empty string
if Left = 0 then
Reference (Empty_Shared_Wide_Wide_String'Access);
DR := Empty_Shared_Wide_Wide_String'Access;
- -- Otherwise, allocate new shared string and fill it.
+ -- Otherwise, allocate new shared string and fill it
else
DR := Allocate (Left);
K : Positive;
begin
- -- Result is an empty string, reuse shared empty string.
+ -- Result is an empty string, reuse shared empty string
if DL = 0 then
Reference (Empty_Shared_Wide_Wide_String'Access);
DR := Empty_Shared_Wide_Wide_String'Access;
- -- Otherwise, allocate new shared string and fill it.
+ -- Otherwise, allocate new shared string and fill it
else
DR := Allocate (DL);
K : Positive;
begin
- -- Result is an empty string, reuse shared empty string.
+ -- Result is an empty string, reuse shared empty string
if DL = 0 then
Reference (Empty_Shared_Wide_Wide_String'Access);
DR := Empty_Shared_Wide_Wide_String'Access;
- -- Coefficient is one, just return string itself.
+ -- Coefficient is one, just return string itself
elsif Left = 1 then
Reference (RR);
DR := RR;
- -- Otherwise, allocate new shared string and fill it.
+ -- Otherwise, allocate new shared string and fill it
else
DR := Allocate (DL);
begin
return LR = RR or else LR.Data (1 .. LR.Last) = RR.Data (1 .. RR.Last);
- -- LR = RR means two strings shares shared string, thus they are equal.
+ -- LR = RR means two strings shares shared string, thus they are equal
end "=";
function "="
DR : Shared_Wide_Wide_String_Access;
begin
- -- Bounds check.
+ -- Bounds check
if Index <= SR.Last then