Commit e29bd38f by Thomas Quinot Committed by Arnaud Charlet

gnatvsn.ads (PCS_Version_Number, [...]): Removed.

2007-09-26  Thomas Quinot  <quinot@adacore.com>
	    Sergey Rybin  <rybin@adacore.com>

	* gnatvsn.ads (PCS_Version_Number, ASIS_Version_Number): Removed.

	* exp_dist.ads (PCS_Version_Number): Move from Gnatvsn to Exp_Dist,
	where it belongs.

	* opt.ads: Move ASIS_Version_Number from Gnatvsn into Tree_IO.

	* rtsfind.adb (PCS_Version_Number): Move from Gnatvsn to Exp_Dist,
	where it belongs.

	* sem_dist.ads: Minor comment fix

	* tree_io.ads: Move ASIS_Version_Number from Gnatvsn into Tree_IO.

From-SVN: r128783
parent 8dfea8e7
......@@ -31,6 +31,13 @@ with Types; use Types;
package Exp_Dist is
PCS_Version_Number : constant := 1;
-- PCS interface version. This is used to check for consistency between the
-- compiler used to generate distribution stubs and the PCS implementation.
-- It must be incremented whenever a change is made to the generated code
-- for distribution stubs that would result in the compiler being
-- incompatible with an older version of the PCS, or vice versa.
procedure Add_RAST_Features (Vis_Decl : Node_Id);
-- Build and add bodies for dereference and 'Access subprograms for a
-- remote access to subprogram type. Vis_Decl is the declaration node for
......
......@@ -90,20 +90,6 @@ package Gnatvsn is
Verbose_Library_Version : constant String := "GNAT Lib v" & Library_Version;
-- Version string stored in e.g. ALI files.
ASIS_Version_Number : constant := 6;
-- ASIS Version. This is used to check for consistency between the compiler
-- used to generate trees, and an ASIS application that is reading the
-- trees. It must be updated (incremented) whenever a change is made to
-- the tree format that would result in a compiler being incompatible with
-- an older version of ASIS, or vice versa.
PCS_Version_Number : constant := 1;
-- PCS interface version. This is used to check for consistency between the
-- compiler used to generate distribution stubs and the PCS implementation.
-- It must be incremented whenever a change is made to the generated code
-- for distribution stubs that would result in the compiler being
-- incompatible with an older version of the PCS, or vice versa.
Current_Year : constant String := "2007";
-- Used in printing copyright messages
......
......@@ -1451,7 +1451,8 @@ package Opt is
-- They are set by Tree_Read procedure, so they represent the version
-- number (and the version string) of the compiler which has created the
-- tree, and they are supposed to be compared with the corresponding values
-- from the Gnatvsn package which is a part of ASIS implementation.
-- from the Tree_IO and Gnatvsn packages which also are a part of ASIS
-- implementation.
Tree_Version_String : String_Access;
-- Used to store the compiler version string read from a tree file to check
......@@ -1464,7 +1465,7 @@ package Opt is
Tree_ASIS_Version_Number : Int;
-- Used to store the ASIS version number read from a tree file to check if
-- it is the same as stored in the ASIS version number in Gnatvsn.
-- it is the same as stored in the ASIS version number in Tree_IO.
private
......
......@@ -30,9 +30,9 @@ with Debug; use Debug;
with Einfo; use Einfo;
with Elists; use Elists;
with Errout; use Errout;
with Exp_Dist; use Exp_Dist;
with Fname; use Fname;
with Fname.UF; use Fname.UF;
with Gnatvsn; use Gnatvsn;
with Lib; use Lib;
with Lib.Load; use Lib.Load;
with Namet; use Namet;
......@@ -921,7 +921,7 @@ package body Rtsfind is
if Get_PCS_Name = Name_No_DSA then
Check_RPC_Failure ("distribution feature not supported");
elsif Get_PCS_Version /= Gnatvsn.PCS_Version_Number then
elsif Get_PCS_Version /= Exp_Dist.PCS_Version_Number then
Check_RPC_Failure ("PCS version mismatch");
end if;
......
......@@ -37,7 +37,7 @@ package Sem_Dist is
function Get_PCS_Version return Int;
-- Return the version number of the PCS API implemented by the PCS.
-- The consistency of this version with the one expected by Exp_Dist
-- (Gnatvsn.PCS_Version_Number) in Rtsfind.Check_RPC.
-- (Exp_Dist.PCS_Version_Number) in Rtsfind.RTE.Check_RPC.
-- If no PCS version information is available, 0 is returned.
procedure Add_Stub_Constructs (N : Node_Id);
......
......@@ -46,6 +46,13 @@ package Tree_IO is
Tree_Format_Error : exception;
-- Raised if a format error is detected in the input file
ASIS_Version_Number : constant := 21;
-- ASIS Version. This is used to check for consistency between the compiler
-- used to generate trees and an ASIS application that is reading the
-- trees. It must be incremented whenever a change is made to the tree
-- format that would result in the compiler being incompatible with an
-- older version of ASIS, or vice versa.
procedure Tree_Read_Initialize (Desc : File_Descriptor);
-- Called to initialize reading of a tree file. This call must be made
-- before calls to Tree_Read_xx. No calls to Tree_Write_xx are permitted
......
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