aboutsummaryrefslogtreecommitdiffstats
path: root/src/vhdl/translate/trans.ads
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2016-12-25 06:24:18 +0100
committerTristan Gingold <tgingold@free.fr>2016-12-26 15:09:06 +0100
commitc202ca1c3cee382716b91911eca785465faf1c97 (patch)
treed993e3fb3857a37d233c50426febf5ac0caef3a8 /src/vhdl/translate/trans.ads
parent3a15aa97c771c91c6483e225bd4b848dfa2d761a (diff)
downloadghdl-c202ca1c3cee382716b91911eca785465faf1c97.tar.gz
ghdl-c202ca1c3cee382716b91911eca785465faf1c97.tar.bz2
ghdl-c202ca1c3cee382716b91911eca785465faf1c97.zip
translate: add unbounded records type_mode (WIP)
Diffstat (limited to 'src/vhdl/translate/trans.ads')
-rw-r--r--src/vhdl/translate/trans.ads29
1 files changed, 19 insertions, 10 deletions
diff --git a/src/vhdl/translate/trans.ads b/src/vhdl/translate/trans.ads
index 5f9248af1..9ca2b9f02 100644
--- a/src/vhdl/translate/trans.ads
+++ b/src/vhdl/translate/trans.ads
@@ -847,12 +847,17 @@ package Trans is
-- Record.
Type_Mode_Record,
- -- Protected type
- Type_Mode_Protected,
+ -- Record with unbounded component(s).
+ Type_Mode_Unbounded_Record,
+ -- Unbounded array type (used for unconstrained array).
+ Type_Mode_Unbounded_Array,
-- Constrained array type (length is known at compile-time).
Type_Mode_Array,
- -- Fat array type (used for unconstrained array).
- Type_Mode_Fat_Array);
+ -- Protected type
+ Type_Mode_Protected);
+
+ -- For backward source compatibility, to be removed (TODO).
+ Type_Mode_Fat_Array : constant Type_Mode_Type := Type_Mode_Unbounded_Array;
subtype Type_Mode_Valid is Type_Mode_Type range
Type_Mode_B1 .. Type_Mode_Type'Last;
@@ -862,14 +867,18 @@ package Trans is
-- Composite types, with the vhdl meaning: record and arrays.
subtype Type_Mode_Composite is Type_Mode_Type range
- Type_Mode_Record .. Type_Mode_Fat_Array;
+ Type_Mode_Record .. Type_Mode_Protected;
subtype Type_Mode_Non_Composite is Type_Mode_Type range
Type_Mode_B1 .. Type_Mode_Bounds_Acc;
-- Array types.
subtype Type_Mode_Arrays is Type_Mode_Type range
- Type_Mode_Array .. Type_Mode_Fat_Array;
+ Type_Mode_Unbounded_Array .. Type_Mode_Array;
+
+ -- Record types.
+ subtype Type_Mode_Records is Type_Mode_Type range
+ Type_Mode_Record .. Type_Mode_Unbounded_Record;
-- Thin types, ie types whose length is a scalar.
subtype Type_Mode_Thin is Type_Mode_Type range
@@ -877,7 +886,7 @@ package Trans is
-- Fat types, ie types whose length is longer than a scalar.
subtype Type_Mode_Fat is Type_Mode_Type range
- Type_Mode_Record .. Type_Mode_Fat_Array;
+ Type_Mode_Record .. Type_Mode_Protected;
-- Subprogram call argument mechanism.
-- In VHDL, the evaluation is strict: actual parameters are evaluated
@@ -918,7 +927,7 @@ package Trans is
-- The parameters are passed by address, ie the argument of the
-- subprogram is an address to the object.
subtype Type_Mode_Pass_By_Address is Type_Mode_Type range
- Type_Mode_Record .. Type_Mode_Fat_Array;
+ Type_Mode_Record .. Type_Mode_Protected;
-- Call conventions.
subtype Type_Mode_Call_By_Value is Type_Mode_Non_Composite;
@@ -1123,10 +1132,10 @@ package Trans is
-- Ortho node which represents the type.
-- Type -> Ortho type
-- scalar -> scalar
- -- record (complex or not) -> record
+ -- bounded record (complex or not) -> record
-- constrained non-complex array -> constrained array
-- constrained complex array -> the element
- -- unconstrained array -> fat pointer
+ -- unboubded array or record -> fat pointer
-- access to unconstrained array -> fat pointer
-- access (others) -> access
-- file -> file_index_type