Commit 8d0a85fd authored by julien.delange's avatar julien.delange

update Ocarina to compile with GNAT GPL 2010



git-svn-id: https://tecsw.estec.esa.int/svn/taste/trunk/ocarina@871 129961e7-ef38-4bb5-a8f7-c9a525a55882
parent b52871e4
......@@ -42,7 +42,7 @@ project Ocarina.Config is
Build_Dir := Ocarina.Top_Build_Dir & "/main";
for Source_Dirs use (Src_Dir, Build_Dir);
for Source_Files use ("ocarina-configuration.adb");
for Source_Files use ("ocarina-configuration.adb", "ocarina-configuration.ads");
for Object_Dir use Build_Dir & "/objects";
for Library_Dir use Build_Dir & "/libs";
for Library_Name use "ocarina-config";
......
......@@ -14,5 +14,6 @@ pragma Profile_Warnings (Ravenscar);
pragma Restrictions (No_Task_Allocators);
pragma Restrictions (No_Protected_Types);
pragma Restrictions (No_Fixed_Point);
pragma Restrictions (No_Wide_Characters);
-- pragma Restrictions (No_Wide_Characters);
-- violated in ocarina-backends-utils.adb:2505
pragma Restrictions (No_Implicit_Heap_Allocations);
......@@ -2340,9 +2340,8 @@ package body Ocarina.Backends.Properties is
end if;
return New_Integer_Value
(Unsigned_Long_Long
(Get_Integer_Property
(P, Port_Number)));
(P, Port_Number));
end Get_Port_Number;
--------------------
......@@ -2359,9 +2358,8 @@ package body Ocarina.Backends.Properties is
end if;
return New_Integer_Value
(Unsigned_Long_Long
(Get_Integer_Property
(P, Process_Id)));
(P, Process_Id));
end Get_Process_Id;
-------------------------
......@@ -2378,9 +2376,8 @@ package body Ocarina.Backends.Properties is
end if;
return New_Integer_Value
(Unsigned_Long_Long
(Get_Integer_Property
(P, Process_Channel_Address)));
(P, Process_Channel_Address));
end Get_Channel_Address;
-------------------------
......
......@@ -2257,7 +2257,7 @@ package body Ocarina.Backends.REAL is
if VT.T = LT_Real then
Result := New_Integer_Value (Unsigned_Long_Long (VT.RVal));
else
Result := New_Integer_Value (Unsigned_Long_Long (VT.IVal));
Result := New_Integer_Value (VT.IVal);
end if;
T := RT_Integer;
end;
......@@ -2317,7 +2317,7 @@ package body Ocarina.Backends.REAL is
if VT.T = LT_Integer then
Result := New_Real_Value (Long_Long_Float (VT.IVal));
else
Result := New_Real_Value (Long_Long_Float (VT.RVal));
Result := New_Real_Value (VT.RVal);
end if;
T := RT_Float;
end;
......
......@@ -563,7 +563,7 @@ package body Ocarina.BE_REAL is
pragma Assert (Kind (Node) = K_Literal);
use Ocarina.REAL_Values;
begin
Write_Str (Image (Value_Id (Value (Node))));
Write_Str (Image (Value (Node)));
end Print_Literal;
-------------------
......
......@@ -180,8 +180,8 @@ package body Ocarina.Instances.REAL_Finder is
RT.IBase, RT.IExp);
else
Result := New_Range_Value
(Long_Long_Float (LT.RVal),
Long_Long_Float (RT.RVal),
(LT.RVal,
RT.RVal,
LT.RSign, RT.RSign,
RT.RBase, RT.RExp);
end if;
......
......@@ -1408,7 +1408,7 @@ package body Ocarina.Analyzer.REAL is
| K_Ternary_Expression =>
Analyze_Verification_Expression (N, Success);
if Success then
case Value_Id (Returned_Type (N)) is
case Returned_Type (N) is
when RT_Float =>
Set_Returned_Type (S, RT_Float_List);
when RT_Integer =>
......@@ -1809,8 +1809,8 @@ package body Ocarina.Analyzer.REAL is
| K_Ternary_Expression =>
Analyze_Verification_Expression (N, Success);
if Success then
if Value_Id (Returned_Type (N)) /= RT_Integer
and then Value_Id (Returned_Type (N)) /=
if Returned_Type (N) /= RT_Integer
and then Returned_Type (N) /=
RT_Float then
Display_Analyzer_Error
(No_Node,
......
......@@ -677,7 +677,7 @@ package body Ocarina.REAL_Values is
-- Get the true integer value of the 'Exp' variable
EVal := Integer (Power (Integer (Exp.IBase),
Integer (Exp.IExp))) *
Exp.IExp)) *
Integer (Exp.IVal);
V := New_Integer_Value (Unsigned_Long_Long
......@@ -715,7 +715,7 @@ package body Ocarina.REAL_Values is
-- Get the true integer value of the 'Exp' variable
EVal := Integer (Power (Integer (Exp.IBase),
Integer (Exp.IExp))) *
Exp.IExp)) *
Integer (Exp.IVal);
V := New_Real_Value (Long_Long_Float
......@@ -833,7 +833,7 @@ package body Ocarina.REAL_Values is
begin
Result.IBase := 10;
Result.ISign := Safe_XOR (L.ISign, R.ISign);
Result.IVal := Unsigned_Long_Long (Lval mod Rval);
Result.IVal := Lval mod Rval;
Result.Iexp := 0;
return Result;
end;
......
......@@ -165,7 +165,7 @@ package body Ocarina.FE_AADL.Lexer is
begin
Float_Literal_Value := 0.0;
Factor := Long_Long_Float (1.0 / Long_Long_Float (Base));
Factor := 1.0 / Long_Long_Float (Base);
Token := T_Real_Literal;
loop
......
......@@ -168,7 +168,7 @@ package body Ocarina.FE_AADL_BA.Lexer is
begin
Float_Literal_Value := 0.0;
Factor := Long_Long_Float (1.0 / Long_Long_Float (Base));
Factor := 1.0 / Long_Long_Float (Base);
Token := T_Real_Literal;
loop
......
......@@ -304,7 +304,7 @@ package body Ocarina.Transfo.Fusions.Scheduler is
if Tmp_GCD > 0 then
if Current > 0 then
Tmp_GCD := Int (Compute_Gcd (Current, Tmp_LCM));
Tmp_GCD := Compute_Gcd (Current, Tmp_LCM);
-- Since GCD (a, b) * LCM (a, b) = a * b
-- LCM (a, b) = (a * b) / GCD (a, b)
......
......@@ -3864,12 +3864,11 @@ package body Ocarina.Transfo.Fusions is
if Gcd = 0 then
if Is_Defined_Property (Old_Thread_1, Period) then
GCD := Unsigned_Long_Long
(Get_Integer_Property (Old_Thread_1, Period));
GCD := Get_Integer_Property (Old_Thread_1, Period);
elsif Is_Defined_Property (Old_Thread_2, Period) then
GCD := Unsigned_Long_Long
(Get_Integer_Property (Old_Thread_2, Period));
GCD :=
Get_Integer_Property (Old_Thread_2, Period);
else
-- Should be periodic !
......
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