summaryrefslogtreecommitdiff
path: root/src/vhdl/sem_scopes.ads
diff options
context:
space:
mode:
authorTristan Gingold2014-12-26 06:26:25 +0100
committerTristan Gingold2014-12-26 06:26:25 +0100
commitcb0609778181832120ca7776dc4501b97d0ebbeb (patch)
treedd63493909b1c7ba818d9c6d9ee252812d06eb29 /src/vhdl/sem_scopes.ads
parent523792edaef032f41ea8a0bb8273013ced2a9276 (diff)
downloadghdl-cb0609778181832120ca7776dc4501b97d0ebbeb.tar.gz
ghdl-cb0609778181832120ca7776dc4501b97d0ebbeb.tar.bz2
ghdl-cb0609778181832120ca7776dc4501b97d0ebbeb.zip
Rewrite sem_scopes tables for speed-up (and clarification).
Diffstat (limited to 'src/vhdl/sem_scopes.ads')
-rw-r--r--src/vhdl/sem_scopes.ads26
1 files changed, 8 insertions, 18 deletions
diff --git a/src/vhdl/sem_scopes.ads b/src/vhdl/sem_scopes.ads
index 76faaf1..3539e31 100644
--- a/src/vhdl/sem_scopes.ads
+++ b/src/vhdl/sem_scopes.ads
@@ -72,28 +72,12 @@ package Sem_Scopes is
return Boolean;
pragma Inline (Valid_Interpretation);
- -- This pseudo interpretation marks the end of the interpretation chain,
- -- and means there is no (more) interpretations for the name.
- -- Unless you need to discriminate between an absence of declaration and
- -- a conflict between potential declarations, you should use the
- -- VALID_INTERPRETATION function.
- No_Name_Interpretation : constant Name_Interpretation_Type;
-
- -- This pseudo interpretation means the name has only conflicting potential
- -- declarations, and also terminates the chain of interpretations.
- -- Unless you need to discriminate between an absence of declaration and
- -- a conflict between potential declarations, you should use the
- -- VALID_INTERPRETATION function.
- Conflict_Interpretation : constant Name_Interpretation_Type;
-
-- Get the first interpretation of identifier ID.
function Get_Interpretation (Id: Name_Id) return Name_Interpretation_Type;
- pragma Inline (Get_Interpretation);
-- Get the next interpretation from an interpretation.
function Get_Next_Interpretation (Ni: Name_Interpretation_Type)
return Name_Interpretation_Type;
- pragma Inline (Get_Next_Interpretation);
-- Get a declaration associated with an interpretation.
function Get_Declaration (Ni: Name_Interpretation_Type) return Iir;
@@ -211,7 +195,13 @@ package Sem_Scopes is
private
type Name_Interpretation_Type is new Int32 range 0 .. (2 ** 30) - 1;
+
+ -- This pseudo interpretation marks the end of the interpretation chain,
+ -- and means there is no (more) interpretations for the name.
+ -- Unless you need to discriminate between an absence of declaration and
+ -- a conflict between potential declarations, you should use the
+ -- VALID_INTERPRETATION function.
No_Name_Interpretation : constant Name_Interpretation_Type := 0;
- Conflict_Interpretation : constant Name_Interpretation_Type := 1;
- First_Valid_Interpretation : constant Name_Interpretation_Type := 2;
+
+ First_Valid_Interpretation : constant Name_Interpretation_Type := 1;
end Sem_Scopes;