aboutsummaryrefslogtreecommitdiffstats
path: root/src/dyn_interning.ads
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2019-10-17 06:53:50 +0200
committerTristan Gingold <tgingold@free.fr>2019-10-17 06:53:50 +0200
commitf7a7752f1e3bfe9ff164795bd94b39d74005bf3a (patch)
treed815e7d0291e09aadfe3ad78fc28d6162db1915b /src/dyn_interning.ads
parent2bcb1aba731ea647f9a8adcbd34ecef84aa68ec9 (diff)
downloadghdl-f7a7752f1e3bfe9ff164795bd94b39d74005bf3a.tar.gz
ghdl-f7a7752f1e3bfe9ff164795bd94b39d74005bf3a.tar.bz2
ghdl-f7a7752f1e3bfe9ff164795bd94b39d74005bf3a.zip
syn_interning: add get_index.
Diffstat (limited to 'src/dyn_interning.ads')
-rw-r--r--src/dyn_interning.ads10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/dyn_interning.ads b/src/dyn_interning.ads
index 2b5dc5ee4..c1bdab420 100644
--- a/src/dyn_interning.ads
+++ b/src/dyn_interning.ads
@@ -47,14 +47,18 @@ package Dyn_Interning is
procedure Free (Inst : in out Instance);
+ type Index_Type is new Uns32;
+ No_Index : constant Index_Type := 0;
+ First_Index : constant Index_Type := 1;
+
-- If there is already an existing object for PARAMS, return it.
-- Otherwise create it.
procedure Get
(Inst : in out Instance; Params : Params_Type; Res : out Object_Type);
- type Index_Type is new Uns32;
- No_Index : constant Index_Type := 0;
- First_Index : constant Index_Type := 1;
+ -- Likewise, but return its index.
+ procedure Get_Index
+ (Inst : in out Instance; Params : Params_Type; Idx : out Index_Type);
-- Get the number of elements in the table.
function Last_Index (Inst : Instance) return Index_Type;