diff options
author | Tristan Gingold <tgingold@free.fr> | 2022-08-28 12:27:45 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2022-09-02 02:31:06 +0200 |
commit | 8a8f3d867598a1f9e3125c9d0648ae20a7144253 (patch) | |
tree | 9802e5c0c5e68e92acbc5c41caf3025fbe1efe02 /src/synth/elab-vhdl_expr.adb | |
parent | 91303467eac522662572d9106e2a3cb724b24a0d (diff) | |
download | ghdl-8a8f3d867598a1f9e3125c9d0648ae20a7144253.tar.gz ghdl-8a8f3d867598a1f9e3125c9d0648ae20a7144253.tar.bz2 ghdl-8a8f3d867598a1f9e3125c9d0648ae20a7144253.zip |
synth: use areapools
Diffstat (limited to 'src/synth/elab-vhdl_expr.adb')
-rw-r--r-- | src/synth/elab-vhdl_expr.adb | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/synth/elab-vhdl_expr.adb b/src/synth/elab-vhdl_expr.adb index 391a75c92..d6a2f6618 100644 --- a/src/synth/elab-vhdl_expr.adb +++ b/src/synth/elab-vhdl_expr.adb @@ -83,7 +83,7 @@ package body Elab.Vhdl_Expr is Res_Type := Create_Array_Type (Bnd, True, El_Typ); end if; - Res := Create_Value_Memory (Res_Type); + Res := Create_Value_Memory (Res_Type, Current_Pool); for I in Flist_First .. Last loop -- Elements are supposed to be static, so no need for enable. @@ -331,10 +331,11 @@ package body Elab.Vhdl_Expr is | Iir_Kind_Dereference => declare Val : Valtyp; + Obj : Memtyp; begin Val := Synth_Expression (Syn_Inst, Get_Prefix (Name)); - Val := Elab.Vhdl_Heap.Synth_Dereference (Read_Access (Val)); - return Val.Typ; + Obj := Elab.Vhdl_Heap.Synth_Dereference (Read_Access (Val)); + return Obj.Typ; end; when Iir_Kind_Function_Call => declare @@ -400,7 +401,7 @@ package body Elab.Vhdl_Expr is | Iir_Kind_Dereference => declare Val : Valtyp; - Res : Valtyp; + Res : Memtyp; begin -- Maybe do not dereference it if its type is known ? Val := Synth_Expression (Syn_Inst, Get_Prefix (Expr)); @@ -452,7 +453,7 @@ package body Elab.Vhdl_Expr is else Res_Type := Create_Array_Type (Bounds, True, El_Type); end if; - Res := Create_Value_Memory (Res_Type); + Res := Create_Value_Memory (Res_Type, Current_Pool); -- Only U8 are handled. pragma Assert (El_Type.Sz = 1); |