From 7be66ca6f555a8d6ce86f4bc6eee9811c8d53306 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Fri, 8 Dec 2017 05:46:21 +0100 Subject: evaluation: rename Get_Info to Get_Str_Info (reduce overloading). --- src/synth/synth-stmts.adb | 3 +-- src/vhdl/evaluation.adb | 9 ++++----- src/vhdl/evaluation.ads | 2 +- 3 files changed, 6 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/synth/synth-stmts.adb b/src/synth/synth-stmts.adb index 75a41d3bf..c074b1aa4 100644 --- a/src/synth/synth-stmts.adb +++ b/src/synth/synth-stmts.adb @@ -199,9 +199,8 @@ package body Synth.Stmts is declare use Evaluation.String_Utils; - Info : Str_Info; + Info : constant Str_Info := Get_Str_Info (Expr); begin - Info := Get_Info (Expr); if Info.Len > 64 then raise Internal_Error; end if; diff --git a/src/vhdl/evaluation.adb b/src/vhdl/evaluation.adb index 95b97fd54..67e3b1ebe 100644 --- a/src/vhdl/evaluation.adb +++ b/src/vhdl/evaluation.adb @@ -3561,8 +3561,7 @@ package body Evaluation is package body String_Utils is -- Fill Res from EL. This is used to speed up Lt and Eq operations. - function Get_Info (Expr : Iir) return Str_Info - is + function Get_Str_Info (Expr : Iir) return Str_Info is begin case Get_Kind (Expr) is when Iir_Kind_Simple_Aggregate => @@ -3581,7 +3580,7 @@ package body Evaluation is when others => Error_Kind ("string_utils.get_info", Expr); end case; - end Get_Info; + end Get_Str_Info; -- Return the position of element IDX of STR. function Get_Pos (Str : Str_Info; Idx : Nat32) return Iir_Int32 @@ -3603,8 +3602,8 @@ package body Evaluation is function Compare_String_Literals (L, R : Iir) return Compare_Type is use String_Utils; - L_Info : constant Str_Info := Get_Info (L); - R_Info : constant Str_Info := Get_Info (R); + L_Info : constant Str_Info := Get_Str_Info (L); + R_Info : constant Str_Info := Get_Str_Info (R); L_Pos, R_Pos : Iir_Int32; begin if L_Info.Len /= R_Info.Len then diff --git a/src/vhdl/evaluation.ads b/src/vhdl/evaluation.ads index 279f5dd80..12f7a7b77 100644 --- a/src/vhdl/evaluation.ads +++ b/src/vhdl/evaluation.ads @@ -189,7 +189,7 @@ package Evaluation is end record; -- Fill Res from EL. This is used to speed up Lt and Eq operations. - function Get_Info (Expr : Iir) return Str_Info; + function Get_Str_Info (Expr : Iir) return Str_Info; -- Return the position of element IDX of STR. function Get_Pos (Str : Str_Info; Idx : Nat32) return Iir_Int32; -- cgit v1.2.3