aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2016-10-13 07:59:39 +0200
committerTristan Gingold <tgingold@free.fr>2016-10-13 07:59:39 +0200
commit1a1d378dcafeca5a18dfa8862ebe412efa1e9718 (patch)
tree7e1d5dddedd857b0e5776ac5a58bfec8c47d6abc /src
parent2f3707ceb2c6ab25a24a280791339c7294ab732c (diff)
downloadghdl-1a1d378dcafeca5a18dfa8862ebe412efa1e9718.tar.gz
ghdl-1a1d378dcafeca5a18dfa8862ebe412efa1e9718.tar.bz2
ghdl-1a1d378dcafeca5a18dfa8862ebe412efa1e9718.zip
iirs: rename base_type to number_base_type to avoid confusion.
Diffstat (limited to 'src')
-rw-r--r--src/vhdl/disp_tree.adb5
-rw-r--r--src/vhdl/iirs.adb8
-rw-r--r--src/vhdl/iirs.ads6
-rw-r--r--src/vhdl/nodes_meta.adb50
-rw-r--r--src/vhdl/nodes_meta.ads12
-rw-r--r--src/vhdl/parse.adb2
-rw-r--r--src/vhdl/sem_inst.adb4
-rw-r--r--src/vhdl/translate/trans-chap2.adb2
-rw-r--r--src/vhdl/translate/trans-chap9.adb2
9 files changed, 46 insertions, 45 deletions
diff --git a/src/vhdl/disp_tree.adb b/src/vhdl/disp_tree.adb
index 062f98d9a..78a8096a8 100644
--- a/src/vhdl/disp_tree.adb
+++ b/src/vhdl/disp_tree.adb
@@ -437,8 +437,9 @@ package body Disp_Tree is
Put_Line (Source_Ptr'Image (Get_Source_Ptr (N, F)));
when Type_Date_Type =>
Put_Line (Date_Type'Image (Get_Date_Type (N, F)));
- when Type_Base_Type =>
- Put_Line (Base_Type'Image (Get_Base_Type (N, F)));
+ when Type_Number_Base_Type =>
+ Put_Line (Number_Base_Type'Image
+ (Get_Number_Base_Type (N, F)));
when Type_Iir_Constraint =>
Put_Line (Image_Iir_Constraint
(Get_Iir_Constraint (N, F)));
diff --git a/src/vhdl/iirs.adb b/src/vhdl/iirs.adb
index b963826df..4f19470e6 100644
--- a/src/vhdl/iirs.adb
+++ b/src/vhdl/iirs.adb
@@ -1032,20 +1032,20 @@ package body Iirs is
Set_Field4 (Lit, Int32_To_Iir (Len));
end Set_String_Length;
- function Get_Bit_String_Base (Lit : Iir) return Base_Type is
+ function Get_Bit_String_Base (Lit : Iir) return Number_Base_Type is
begin
pragma Assert (Lit /= Null_Iir);
pragma Assert (Has_Bit_String_Base (Get_Kind (Lit)),
"no field Bit_String_Base");
- return Base_Type'Val (Get_Odigit1 (Lit));
+ return Number_Base_Type'Val (Get_Odigit1 (Lit));
end Get_Bit_String_Base;
- procedure Set_Bit_String_Base (Lit : Iir; Base : Base_Type) is
+ procedure Set_Bit_String_Base (Lit : Iir; Base : Number_Base_Type) is
begin
pragma Assert (Lit /= Null_Iir);
pragma Assert (Has_Bit_String_Base (Get_Kind (Lit)),
"no field Bit_String_Base");
- Set_Odigit1 (Lit, Base_Type'Pos (Base));
+ Set_Odigit1 (Lit, Number_Base_Type'Pos (Base));
end Set_Bit_String_Base;
function Get_Has_Signed (Lit : Iir) return Boolean is
diff --git a/src/vhdl/iirs.ads b/src/vhdl/iirs.ads
index e3c298cf5..af9c7478b 100644
--- a/src/vhdl/iirs.ads
+++ b/src/vhdl/iirs.ads
@@ -5297,7 +5297,7 @@ package Iirs is
-- Purity depth of an impure subprogram.
Iir_Depth_Impure : constant Iir_Int32 := -1;
- type Base_Type is (Base_None, Base_2, Base_8, Base_10, Base_16);
+ type Number_Base_Type is (Base_None, Base_2, Base_8, Base_10, Base_16);
-- design file
subtype Iir_Design_File is Iir;
@@ -5758,8 +5758,8 @@ package Iirs is
-- Base of a bit string. Base_None for a string literal.
-- Field: Odigit1 (pos)
- function Get_Bit_String_Base (Lit : Iir) return Base_Type;
- procedure Set_Bit_String_Base (Lit : Iir; Base : Base_Type);
+ function Get_Bit_String_Base (Lit : Iir) return Number_Base_Type;
+ procedure Set_Bit_String_Base (Lit : Iir; Base : Number_Base_Type);
-- Bit string is signed.
-- Field: Flag1
diff --git a/src/vhdl/nodes_meta.adb b/src/vhdl/nodes_meta.adb
index 2ed58711b..6a4f27355 100644
--- a/src/vhdl/nodes_meta.adb
+++ b/src/vhdl/nodes_meta.adb
@@ -50,7 +50,7 @@ package body Nodes_Meta is
Field_Simple_Aggregate_List => Type_Iir_List,
Field_String8_Id => Type_String8_Id,
Field_String_Length => Type_Int32,
- Field_Bit_String_Base => Type_Base_Type,
+ Field_Bit_String_Base => Type_Number_Base_Type,
Field_Has_Signed => Type_Boolean,
Field_Has_Sign => Type_Boolean,
Field_Has_Length => Type_Boolean,
@@ -4600,30 +4600,6 @@ package body Nodes_Meta is
return Fields_Of_Iir (First .. Last);
end Get_Fields;
- function Get_Base_Type
- (N : Iir; F : Fields_Enum) return Base_Type is
- begin
- pragma Assert (Fields_Type (F) = Type_Base_Type);
- case F is
- when Field_Bit_String_Base =>
- return Get_Bit_String_Base (N);
- when others =>
- raise Internal_Error;
- end case;
- end Get_Base_Type;
-
- procedure Set_Base_Type
- (N : Iir; F : Fields_Enum; V: Base_Type) is
- begin
- pragma Assert (Fields_Type (F) = Type_Base_Type);
- case F is
- when Field_Bit_String_Base =>
- Set_Bit_String_Base (N, V);
- when others =>
- raise Internal_Error;
- end case;
- end Set_Base_Type;
-
function Get_Boolean
(N : Iir; F : Fields_Enum) return Boolean is
begin
@@ -6312,6 +6288,30 @@ package body Nodes_Meta is
end case;
end Set_Name_Id;
+ function Get_Number_Base_Type
+ (N : Iir; F : Fields_Enum) return Number_Base_Type is
+ begin
+ pragma Assert (Fields_Type (F) = Type_Number_Base_Type);
+ case F is
+ when Field_Bit_String_Base =>
+ return Get_Bit_String_Base (N);
+ when others =>
+ raise Internal_Error;
+ end case;
+ end Get_Number_Base_Type;
+
+ procedure Set_Number_Base_Type
+ (N : Iir; F : Fields_Enum; V: Number_Base_Type) is
+ begin
+ pragma Assert (Fields_Type (F) = Type_Number_Base_Type);
+ case F is
+ when Field_Bit_String_Base =>
+ Set_Bit_String_Base (N, V);
+ when others =>
+ raise Internal_Error;
+ end case;
+ end Set_Number_Base_Type;
+
function Get_PSL_NFA
(N : Iir; F : Fields_Enum) return PSL_NFA is
begin
diff --git a/src/vhdl/nodes_meta.ads b/src/vhdl/nodes_meta.ads
index 0904c0c63..c9d51c9da 100644
--- a/src/vhdl/nodes_meta.ads
+++ b/src/vhdl/nodes_meta.ads
@@ -24,7 +24,6 @@ package Nodes_Meta is
-- The enumeration of all possible types in the nodes.
type Types_Enum is
(
- Type_Base_Type,
Type_Boolean,
Type_Date_State_Type,
Type_Date_Type,
@@ -47,6 +46,7 @@ package Nodes_Meta is
Type_Int32,
Type_Location_Type,
Type_Name_Id,
+ Type_Number_Base_Type,
Type_PSL_NFA,
Type_PSL_Node,
Type_Source_Ptr,
@@ -417,11 +417,6 @@ package Nodes_Meta is
function Get_Fields (K : Iir_Kind) return Fields_Array;
-- Get/Set a field.
- function Get_Base_Type
- (N : Iir; F : Fields_Enum) return Base_Type;
- procedure Set_Base_Type
- (N : Iir; F : Fields_Enum; V: Base_Type);
-
function Get_Boolean
(N : Iir; F : Fields_Enum) return Boolean;
procedure Set_Boolean
@@ -532,6 +527,11 @@ package Nodes_Meta is
procedure Set_Name_Id
(N : Iir; F : Fields_Enum; V: Name_Id);
+ function Get_Number_Base_Type
+ (N : Iir; F : Fields_Enum) return Number_Base_Type;
+ procedure Set_Number_Base_Type
+ (N : Iir; F : Fields_Enum; V: Number_Base_Type);
+
function Get_PSL_NFA
(N : Iir; F : Fields_Enum) return PSL_NFA;
procedure Set_PSL_NFA
diff --git a/src/vhdl/parse.adb b/src/vhdl/parse.adb
index 72ae0ea0f..49ce426e4 100644
--- a/src/vhdl/parse.adb
+++ b/src/vhdl/parse.adb
@@ -4663,7 +4663,7 @@ package body Parse is
use Name_Table;
Res : Iir;
C : Character;
- B : Base_Type;
+ B : Number_Base_Type;
begin
Res := Create_Iir (Iir_Kind_String_Literal8);
Set_Location (Res);
diff --git a/src/vhdl/sem_inst.adb b/src/vhdl/sem_inst.adb
index 15bfc214b..5467858d5 100644
--- a/src/vhdl/sem_inst.adb
+++ b/src/vhdl/sem_inst.adb
@@ -267,8 +267,8 @@ package body Sem_Inst is
| Type_File_Checksum_Id =>
-- Can this happen ?
raise Internal_Error;
- when Type_Base_Type =>
- Set_Base_Type (Res, F, Get_Base_Type (N, F));
+ when Type_Number_Base_Type =>
+ Set_Number_Base_Type (Res, F, Get_Number_Base_Type (N, F));
when Type_Iir_Constraint =>
Set_Iir_Constraint (Res, F, Get_Iir_Constraint (N, F));
when Type_Iir_Mode =>
diff --git a/src/vhdl/translate/trans-chap2.adb b/src/vhdl/translate/trans-chap2.adb
index 54c844aea..74bb8edeb 100644
--- a/src/vhdl/translate/trans-chap2.adb
+++ b/src/vhdl/translate/trans-chap2.adb
@@ -1248,7 +1248,7 @@ package body Trans.Chap2 is
raise Internal_Error;
when Type_String8_Id
| Type_Source_Ptr
- | Type_Base_Type
+ | Type_Number_Base_Type
| Type_Iir_Constraint
| Type_Iir_Mode
| Type_Iir_Index32
diff --git a/src/vhdl/translate/trans-chap9.adb b/src/vhdl/translate/trans-chap9.adb
index 1dadfba4d..b8cc5741a 100644
--- a/src/vhdl/translate/trans-chap9.adb
+++ b/src/vhdl/translate/trans-chap9.adb
@@ -1188,7 +1188,7 @@ package body Trans.Chap9 is
| Type_File_Checksum_Id
| Type_String8_Id
| Type_Source_Ptr
- | Type_Base_Type
+ | Type_Number_Base_Type
| Type_Iir_Constraint
| Type_Iir_Mode
| Type_Iir_Index32