diff options
author | Tristan Gingold <tgingold@free.fr> | 2014-09-02 21:17:16 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2014-09-02 21:17:16 +0200 |
commit | e6ffb98cb5ad3f07bcaf79323d8ab8411688c494 (patch) | |
tree | 46a91868b6e4aeb5354249c74507b3e92e85f01f /sem_types.ads | |
parent | e393e8b7babd9d2dbe5e6bb7816b82036b857a1f (diff) | |
download | ghdl-e6ffb98cb5ad3f07bcaf79323d8ab8411688c494.tar.gz ghdl-e6ffb98cb5ad3f07bcaf79323d8ab8411688c494.tar.bz2 ghdl-e6ffb98cb5ad3f07bcaf79323d8ab8411688c494.zip |
Keep names in the tree.
This is a large change to improve error locations and allow pretty printing.
Diffstat (limited to 'sem_types.ads')
-rw-r--r-- | sem_types.ads | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/sem_types.ads b/sem_types.ads index 16548b007..8eb7de108 100644 --- a/sem_types.ads +++ b/sem_types.ads @@ -18,26 +18,24 @@ with Iirs; use Iirs; package Sem_Types is - -- Semantization of types (LRM chapter 3) + -- Semantization of types (LRM93 3 / LRM08 5) - -- Semantize subtype indication DEF. - -- If INCOMPLETE is TRUE, then DEF may designate an incomplete type - -- definition. - -- This is used by sem_expr for qualified expression and allocators. + -- Semantize subtype indication DEF. + -- If INCOMPLETE is TRUE, then DEF may designate an incomplete type + -- definition. Return either a name (denoting a type) or an anonymous + -- subtype definition. function Sem_Subtype_Indication (Def: Iir; Incomplete : Boolean := False) return Iir; - -- Return FALSE if A_TYPE is an unconstrained array type or subtype. - --function Sem_Is_Constrained (A_Type: Iir) return Boolean; - procedure Sem_Protected_Type_Body (Bod : Iir); function Sem_Type_Definition (Def: Iir; Decl: Iir) return Iir; - -- Convert a range expression to a subtype definition whose constraint is - -- A_RANGE. - -- This function extract the type of the range expression. - function Range_To_Subtype_Definition (A_Range: Iir) return Iir; + -- If A_RANGE is a range (range expression or range attribute), convert it + -- to a subtype definition. Otherwise return A_RANGE. + -- The result is a subtype indication: either a type name or a subtype + -- definition. + function Range_To_Subtype_Indication (A_Range: Iir) return Iir; -- ATYPE is used to declare a signal. -- Set (recursively) the Has_Signal_Flag on ATYPE and all types used by @@ -54,6 +52,6 @@ package Sem_Types is -- This is used when an alias of DEF is required (eg: subtype a is b). function Copy_Subtype_Indication (Def : Iir) return Iir; + -- Although a nature is not a type, it is patterned like a type. function Sem_Subnature_Indication (Def: Iir) return Iir; - -- Also a nature is not a type, it is patterned like a type. end Sem_Types; |