diff options
author | Tristan Gingold <tgingold@free.fr> | 2020-03-25 18:40:54 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2020-03-25 18:40:54 +0100 |
commit | 7c7695812a7488dfb463ec1f0d4244550e5998c8 (patch) | |
tree | 9c36a70512b5d3b5490db00ade5761f621bf8e97 /src/synth/synth-environment.adb | |
parent | ea3420007b27c2975654f84bc27ff53e0f3a871e (diff) | |
download | ghdl-7c7695812a7488dfb463ec1f0d4244550e5998c8.tar.gz ghdl-7c7695812a7488dfb463ec1f0d4244550e5998c8.tar.bz2 ghdl-7c7695812a7488dfb463ec1f0d4244550e5998c8.zip |
synth-environment: simplify code.
Diffstat (limited to 'src/synth/synth-environment.adb')
-rw-r--r-- | src/synth/synth-environment.adb | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/src/synth/synth-environment.adb b/src/synth/synth-environment.adb index 49230cce6..af6dd55c1 100644 --- a/src/synth/synth-environment.adb +++ b/src/synth/synth-environment.adb @@ -260,13 +260,10 @@ package body Synth.Environment is is Phi : Phi_Type renames Phis_Table.Table (Current_Phi); Asgn, Next_Asgn : Seq_Assign; - First, Last : Seq_Assign; Wid : Wire_Id; begin - First := No_Seq_Assign; - Last := No_Seq_Assign; Asgn := Phi.First; - Phi.Nbr := 0; + Phi := (First => No_Seq_Assign, Last => No_Seq_Assign, Nbr => 0); while Asgn /= No_Seq_Assign loop pragma Assert (Assign_Table.Table (Asgn).Phi = Current_Phi); Next_Asgn := Get_Assign_Chain (Asgn); @@ -279,17 +276,16 @@ package body Synth.Environment is Wire_Id_Table.Table (Wid).Cur_Assign := No_Seq_Assign; else -- Append. - if First = No_Seq_Assign then - First := Asgn; + if Phi.First = No_Seq_Assign then + Phi.First := Asgn; else - Set_Assign_Chain (Last, Asgn); + Set_Assign_Chain (Phi.Last, Asgn); end if; Phi.Nbr := Phi.Nbr + 1; - Last := Asgn; + Phi.Last := Asgn; end if; Asgn := Next_Asgn; end loop; - Phi.First := First; end Phi_Discard_Wires; function Get_Conc_Offset (Asgn : Conc_Assign) return Uns32 is |