From 3f4fcc9904a2f84505a701e822944c49812dde3a Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Wed, 31 Jul 2019 06:56:20 +0200 Subject: synth: add location on monadic operators. --- src/synth/synth-expr.adb | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/synth/synth-expr.adb b/src/synth/synth-expr.adb index 943608aaf..67121652f 100644 --- a/src/synth/synth-expr.adb +++ b/src/synth/synth-expr.adb @@ -1070,20 +1070,23 @@ package body Synth.Expr is is Operand : Value_Acc; - function Synth_Bit_Monadic (Id : Monadic_Module_Id) return Value_Acc is + function Synth_Bit_Monadic (Id : Monadic_Module_Id) return Value_Acc + is + N : Net; begin - return Create_Value_Net - (Build_Monadic (Build_Context, Id, Get_Net (Operand)), - Operand.Typ); + N := Build_Monadic (Build_Context, Id, Get_Net (Operand)); + Set_Location (N, Loc); + return Create_Value_Net (N, Operand.Typ); end Synth_Bit_Monadic; function Synth_Vec_Monadic (Id : Monadic_Module_Id) return Value_Acc is Op: constant Net := Get_Net (Operand); + N : Net; begin - return Create_Value_Net - (Build_Monadic (Build_Context, Id, Op), - Create_Res_Bound (Operand, Op)); + N := Build_Monadic (Build_Context, Id, Op); + Set_Location (N, Loc); + return Create_Value_Net (N, Create_Res_Bound (Operand, Op)); end Synth_Vec_Monadic; begin Operand := Synth_Expression (Syn_Inst, Operand_Expr); -- cgit v1.2.3