diff options
author | Tristan Gingold <tgingold@free.fr> | 2015-09-10 20:59:08 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2015-09-10 20:59:08 +0200 |
commit | 42f4c411641c04da2b8f08f9029e17bfd37206e4 (patch) | |
tree | 97db2955734ee7e059f461cef8a2924eeb49271d /src/vhdl | |
parent | 95632804220716d4993d3e4b0d0cba06d984a837 (diff) | |
download | ghdl-42f4c411641c04da2b8f08f9029e17bfd37206e4.tar.gz ghdl-42f4c411641c04da2b8f08f9029e17bfd37206e4.tar.bz2 ghdl-42f4c411641c04da2b8f08f9029e17bfd37206e4.zip |
Reimplement table package (used instead of GNAT.Table).
Diffstat (limited to 'src/vhdl')
-rw-r--r-- | src/vhdl/configuration.ads | 7 | ||||
-rw-r--r-- | src/vhdl/nodes.adb | 7 | ||||
-rw-r--r-- | src/vhdl/sem_inst.adb | 12 | ||||
-rw-r--r-- | src/vhdl/sem_scopes.adb | 17 | ||||
-rw-r--r-- | src/vhdl/xrefs.adb | 7 |
5 files changed, 21 insertions, 29 deletions
diff --git a/src/vhdl/configuration.ads b/src/vhdl/configuration.ads index e02a2cdfb..8545c224c 100644 --- a/src/vhdl/configuration.ads +++ b/src/vhdl/configuration.ads @@ -17,15 +17,14 @@ -- 02111-1307, USA. with Types; use Types; with Iirs; use Iirs; -with GNAT.Table; +with Tables; package Configuration is - package Design_Units is new GNAT.Table + package Design_Units is new Tables (Table_Component_Type => Iir_Design_Unit, Table_Index_Type => Natural, Table_Low_Bound => 1, - Table_Initial => 16, - Table_Increment => 100); + Table_Initial => 16); -- Get the top configuration to build a design hierarchy whose top is -- PRIMARY + SECONDARY. diff --git a/src/vhdl/nodes.adb b/src/vhdl/nodes.adb index 3f0a2b317..88548f78a 100644 --- a/src/vhdl/nodes.adb +++ b/src/vhdl/nodes.adb @@ -15,7 +15,7 @@ -- along with GHDL; see the file COPYING. If not, write to the Free -- Software Foundation, 59 Temple Place - Suite 330, Boston, MA -- 02111-1307, USA. -with GNAT.Table; +with Tables; package body Nodes is -- Suppress the access check of the table base. This is really safe to @@ -31,12 +31,11 @@ package body Nodes is -- iirs do their own checks. pragma Suppress (Discriminant_Check); - package Nodet is new GNAT.Table + package Nodet is new Tables (Table_Component_Type => Node_Record, Table_Index_Type => Node_Type, Table_Low_Bound => 2, - Table_Initial => 1024, - Table_Increment => 100); + Table_Initial => 1024); function Get_Last_Node return Node_Type is begin diff --git a/src/vhdl/sem_inst.adb b/src/vhdl/sem_inst.adb index b60b34b9b..cb46b833d 100644 --- a/src/vhdl/sem_inst.adb +++ b/src/vhdl/sem_inst.adb @@ -14,7 +14,7 @@ -- package to its duplicated node. Links from instantiated declaration to -- the original declaration are also stored in that table. -with GNAT.Table; +with Tables; with Nodes; with Nodes_Meta; with Types; use Types; @@ -38,12 +38,11 @@ package body Sem_Inst is -- The origin of Nat1 is Nat and this is true forever. During -- instantiation, the instance of Nat is Nat1, so that the type of N will -- be set to Nat1. - package Origin_Table is new GNAT.Table + package Origin_Table is new Tables (Table_Component_Type => Iir, Table_Index_Type => Iir, Table_Low_Bound => 2, - Table_Initial => 1024, - Table_Increment => 100); + Table_Initial => 1024); procedure Expand_Origin_Table is @@ -109,12 +108,11 @@ package body Sem_Inst is -- have uninstantiated packages in instantiated packages. In that case, -- the slot in Origin_Table cannot be the origin and the instance at the -- same time. - package Prev_Instance_Table is new GNAT.Table + package Prev_Instance_Table is new Tables (Table_Component_Type => Instance_Entry_Type, Table_Index_Type => Instance_Index_Type, Table_Low_Bound => 1, - Table_Initial => 256, - Table_Increment => 100); + Table_Initial => 256); procedure Set_Instance (Orig : Iir; N : Iir) is diff --git a/src/vhdl/sem_scopes.adb b/src/vhdl/sem_scopes.adb index 442da3837..4add63323 100644 --- a/src/vhdl/sem_scopes.adb +++ b/src/vhdl/sem_scopes.adb @@ -16,7 +16,7 @@ -- Software Foundation, 59 Temple Place - Suite 330, Boston, MA -- 02111-1307, USA. with Ada.Text_IO; -with GNAT.Table; +with Tables; with Flags; use Flags; with Name_Table; -- use Name_Table; with Files_Map; use Files_Map; @@ -52,12 +52,11 @@ package body Sem_Scopes is end record; pragma Pack (Interpretation_Cell); - package Interpretations is new GNAT.Table + package Interpretations is new Tables (Table_Component_Type => Interpretation_Cell, Table_Index_Type => Name_Interpretation_Type, Table_Low_Bound => First_Valid_Interpretation, - Table_Initial => 1024, - Table_Increment => 100); + Table_Initial => 1024); -- Cached value of Prev_In_Region of current region. Last_In_Region : Name_Id := Null_Identifier; @@ -76,12 +75,11 @@ package body Sem_Scopes is type Hide_Index is new Nat32; No_Hide_Index : constant Hide_Index := 0; - package Hidden_Decls is new GNAT.Table + package Hidden_Decls is new Tables (Table_Component_Type => Name_Interpretation_Type, Table_Index_Type => Hide_Index, Table_Low_Bound => No_Hide_Index + 1, - Table_Initial => 32, - Table_Increment => 100); + Table_Initial => 32); -- First non-local hidden declarations. In VHDL, it is possible to hide -- an overloaded declaration (by declaring a subprogram with the same @@ -118,12 +116,11 @@ package body Sem_Scopes is Saved_First_Interpretation : Name_Interpretation_Type; end record; - package Scopes is new GNAT.Table + package Scopes is new Tables (Table_Component_Type => Scope_Cell, Table_Index_Type => Natural, Table_Low_Bound => 1, - Table_Initial => 64, - Table_Increment => 100); + Table_Initial => 64); function Valid_Interpretation (Inter : Name_Interpretation_Type) return Boolean is diff --git a/src/vhdl/xrefs.adb b/src/vhdl/xrefs.adb index 15696696b..aa2329505 100644 --- a/src/vhdl/xrefs.adb +++ b/src/vhdl/xrefs.adb @@ -15,7 +15,7 @@ -- along with GHDL; see the file COPYING. If not, write to the Free -- Software Foundation, 59 Temple Place - Suite 330, Boston, MA -- 02111-1307, USA. -with GNAT.Table; +with Tables; with GNAT.Heap_Sort_A; with Flags; with Std_Package; @@ -34,12 +34,11 @@ package body Xrefs is Kind : Xref_Kind; end record; - package Xref_Table is new GNAT.Table + package Xref_Table is new Tables (Table_Index_Type => Natural, Table_Component_Type => Xref_Type, Table_Low_Bound => 0, - Table_Initial => 128, - Table_Increment => 100); + Table_Initial => 128); function Get_Xref_Location (N : Xref) return Location_Type is begin |