Commit 08564036 by Arnaud Charlet

[multiple changes]

2010-09-10  Jose Ruiz  <ruiz@adacore.com>

	* exp_cg.adb (Is_Predefined_Dispatching_Operation): Add the "__" scope
	separator when trying the pattern matching to detect predefined
	primitive operations.

2010-09-10  Robert Dewar  <dewar@adacore.com>

	* bindgen.adb, atree.adb: Minor reformatting.

2010-09-10  Ben Brosgol  <brosgol@adacore.com>

	* ug_words, gnat_ugn.texi: Revised "Transitioning to 64-Bit GNAT for
	OpenVMS" section.

From-SVN: r164175
parent 8c4353b7
2010-09-10 Jose Ruiz <ruiz@adacore.com>
* exp_cg.adb (Is_Predefined_Dispatching_Operation): Add the "__" scope
separator when trying the pattern matching to detect predefined
primitive operations.
2010-09-10 Robert Dewar <dewar@adacore.com>
* bindgen.adb, atree.adb: Minor reformatting.
2010-09-10 Ben Brosgol <brosgol@adacore.com>
* ug_words, gnat_ugn.texi: Revised "Transitioning to 64-Bit GNAT for
OpenVMS" section.
2010-09-10 Doug Rupp <rupp@adacore.com> 2010-09-10 Doug Rupp <rupp@adacore.com>
* bindgen.adb: Minor comment fix for -H switch. * bindgen.adb: Minor comment fix for -H switch.
......
...@@ -1261,7 +1261,7 @@ package body Atree is ...@@ -1261,7 +1261,7 @@ package body Atree is
-- New_Node_Breakpoint -- -- New_Node_Breakpoint --
------------------------- -------------------------
procedure nn is -- New_Node_Breakpoint procedure nn is
begin begin
Write_Str ("Watched node "); Write_Str ("Watched node ");
Write_Int (Int (Watch_Node)); Write_Int (Int (Watch_Node));
...@@ -1273,7 +1273,7 @@ package body Atree is ...@@ -1273,7 +1273,7 @@ package body Atree is
-- New_Node_Debugging_Output -- -- New_Node_Debugging_Output --
------------------------------- -------------------------------
procedure nnd (N : Node_Id) is -- New_Node_Debugging_Output procedure nnd (N : Node_Id) is
Node_Is_Watched : constant Boolean := N = Watch_Node; Node_Is_Watched : constant Boolean := N = Watch_Node;
begin begin
...@@ -1666,7 +1666,7 @@ package body Atree is ...@@ -1666,7 +1666,7 @@ package body Atree is
-- Rewrite_Breakpoint -- -- Rewrite_Breakpoint --
------------------------- -------------------------
procedure rr is -- Rewrite_Breakpoint procedure rr is
begin begin
Write_Str ("Watched node "); Write_Str ("Watched node ");
Write_Int (Int (Watch_Node)); Write_Int (Int (Watch_Node));
...@@ -1678,7 +1678,7 @@ package body Atree is ...@@ -1678,7 +1678,7 @@ package body Atree is
-- Rewrite_Debugging_Output -- -- Rewrite_Debugging_Output --
------------------------------ ------------------------------
procedure rrd (Old_Node, New_Node : Node_Id) is -- Rewrite_Debugging_Output procedure rrd (Old_Node, New_Node : Node_Id) is
Node_Is_Watched : constant Boolean := Old_Node = Watch_Node; Node_Is_Watched : constant Boolean := Old_Node = Watch_Node;
begin begin
......
...@@ -792,8 +792,9 @@ package body Bindgen is ...@@ -792,8 +792,9 @@ package body Bindgen is
Write_Statement_Buffer; Write_Statement_Buffer;
-- Generate call to Install_Handler -- Generate call to Install_Handler
-- In .NET, when binding with -z, we don't install the signal
-- handler to let the caller handle the last exception handler. -- In .NET, when binding with -z, we don't install the signal handler
-- to let the caller handle the last exception handler.
if VM_Target /= CLI_Target if VM_Target /= CLI_Target
or else Bind_Main_Program or else Bind_Main_Program
......
...@@ -271,12 +271,21 @@ package body Exp_CG is ...@@ -271,12 +271,21 @@ package body Exp_CG is
for J in Predef_Names_95'Range loop for J in Predef_Names_95'Range loop
Get_Name_String (Predef_Names_95 (J)); Get_Name_String (Predef_Names_95 (J));
if Full_Name'Last - Suffix_Length > Name_Len -- The predefined primitive operations are identified by the
-- names "_size", "_alignment", etc. If we try a pattern
-- matching against this string, we can wrongly match other
-- primitive operations like "get_size". To avoid this, we
-- add the "__" scope separator, which can only prepend
-- predefined primitive operations because other primitive
-- operations can neither start with an underline nor
-- contain two consecutive underlines in its name.
if Full_Name'Last - Suffix_Length > Name_Len + 2
and then and then
Full_Name Full_Name
(Full_Name'Last - Name_Len - Suffix_Length + 1 (Full_Name'Last - Name_Len - 2 - Suffix_Length + 1
.. Full_Name'Last - Suffix_Length) = .. Full_Name'Last - Suffix_Length) =
Name_Buffer (1 .. Name_Len) "__" & Name_Buffer (1 .. Name_Len)
then then
-- For the equality operator the type of the two operands -- For the equality operator the type of the two operands
-- must also match. -- must also match.
...@@ -291,12 +300,12 @@ package body Exp_CG is ...@@ -291,12 +300,12 @@ package body Exp_CG is
for J in Predef_Names_05'Range loop for J in Predef_Names_05'Range loop
Get_Name_String (Predef_Names_05 (J)); Get_Name_String (Predef_Names_05 (J));
if Full_Name'Last - Suffix_Length > Name_Len if Full_Name'Last - Suffix_Length > Name_Len + 2
and then and then
Full_Name Full_Name
(Full_Name'Last - Name_Len - Suffix_Length + 1 (Full_Name'Last - Name_Len - 2 - Suffix_Length + 1
.. Full_Name'Last - Suffix_Length) = .. Full_Name'Last - Suffix_Length) =
Name_Buffer (1 .. Name_Len) "__" & Name_Buffer (1 .. Name_Len)
then then
return True; return True;
end if; end if;
......
...@@ -218,3 +218,5 @@ stderr ^ SYS$ERROR ...@@ -218,3 +218,5 @@ stderr ^ SYS$ERROR
-O1 ^ /OPTIMIZE=SOME -O1 ^ /OPTIMIZE=SOME
-O2 ^ /OPTIMIZE=ALL -O2 ^ /OPTIMIZE=ALL
-O3 ^ /OPTIMIZE=INLINING -O3 ^ /OPTIMIZE=INLINING
-H32 ^ /32_MALLOC
-H64 ^ /64_MALLOC
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment