summaryrefslogtreecommitdiff
path: root/src/grt/grt-disp_rti.adb
diff options
context:
space:
mode:
Diffstat (limited to 'src/grt/grt-disp_rti.adb')
-rw-r--r--src/grt/grt-disp_rti.adb53
1 files changed, 22 insertions, 31 deletions
diff --git a/src/grt/grt-disp_rti.adb b/src/grt/grt-disp_rti.adb
index 1e029d1..ad45d08 100644
--- a/src/grt/grt-disp_rti.adb
+++ b/src/grt/grt-disp_rti.adb
@@ -702,16 +702,21 @@ package body Grt.Disp_Rti is
when Ghdl_Rtik_Generate_Body =>
Disp_Rti_Arr (Blk.Nbr_Child, Blk.Children,
Ctxt, Indent + 1);
+ when Ghdl_Rtik_If_Generate =>
+ Nctxt := Get_If_Generate_Child (Ctxt, To_Ghdl_Rti_Access (Blk));
+ Disp_Block
+ (To_Ghdl_Rtin_Block_Acc (Nctxt.Block), Nctxt, Indent + 1);
when others =>
Internal_Error ("disp_block");
end case;
end Disp_Block;
- procedure Disp_Generate (Gen : Ghdl_Rtin_Generate_Acc;
- Ctxt : Rti_Context;
- Indent : Natural)
+ procedure Disp_For_Generate (Gen : Ghdl_Rtin_Generate_Acc;
+ Ctxt : Rti_Context;
+ Indent : Natural)
is
Nctxt : Rti_Context;
+ Length : Ghdl_Index_Type;
begin
Disp_Indent (Indent);
Disp_Kind (Gen.Common.Kind);
@@ -721,31 +726,16 @@ package body Grt.Disp_Rti is
Put (": ");
Disp_Name (Gen.Name);
New_Line;
- case Gen.Common.Kind is
- when Ghdl_Rtik_For_Generate =>
- declare
- Length : Ghdl_Index_Type;
- begin
- Nctxt := (Base => To_Addr_Acc (Ctxt.Base + Gen.Loc).all,
- Block => Gen.Child);
- Length := Get_For_Generate_Length (Gen, Ctxt);
- for I in 1 .. Length loop
- Disp_Block (To_Ghdl_Rtin_Block_Acc (Gen.Child),
- Nctxt, Indent + 1);
- Nctxt.Base := Nctxt.Base + Gen.Size;
- end loop;
- end;
- when Ghdl_Rtik_If_Generate =>
- Nctxt := (Base => To_Addr_Acc (Ctxt.Base + Gen.Loc).all,
- Block => Gen.Child);
- if Nctxt.Base /= Null_Address then
- Disp_Block (To_Ghdl_Rtin_Block_Acc (Gen.Child),
- Nctxt, Indent + 1);
- end if;
- when others =>
- Internal_Error ("disp_generate");
- end case;
- end Disp_Generate;
+
+ Nctxt := (Base => To_Addr_Acc (Ctxt.Base + Gen.Loc).all,
+ Block => Gen.Child);
+ Length := Get_For_Generate_Length (Gen, Ctxt);
+ for I in 1 .. Length loop
+ Disp_Block (To_Ghdl_Rtin_Block_Acc (Gen.Child),
+ Nctxt, Indent + 1);
+ Nctxt.Base := Nctxt.Base + Gen.Size;
+ end loop;
+ end Disp_For_Generate;
procedure Disp_Object (Obj : Ghdl_Rtin_Object_Acc;
Is_Sig : Boolean;
@@ -1083,9 +1073,10 @@ package body Grt.Disp_Rti is
| Ghdl_Rtik_Process
| Ghdl_Rtik_Block =>
Disp_Block (To_Ghdl_Rtin_Block_Acc (Rti), Ctxt, Indent);
- when Ghdl_Rtik_If_Generate
- | Ghdl_Rtik_For_Generate =>
- Disp_Generate (To_Ghdl_Rtin_Generate_Acc (Rti), Ctxt, Indent);
+ when Ghdl_Rtik_If_Generate =>
+ Disp_Block (To_Ghdl_Rtin_Block_Acc (Rti), Ctxt, Indent);
+ when Ghdl_Rtik_For_Generate =>
+ Disp_For_Generate (To_Ghdl_Rtin_Generate_Acc (Rti), Ctxt, Indent);
when Ghdl_Rtik_Package_Body =>
Disp_Rti (To_Ghdl_Rtin_Block_Acc (Rti).Parent, Ctxt, Indent);
Disp_Block (To_Ghdl_Rtin_Block_Acc (Rti), Ctxt, Indent);