[m-rev.] diff: update the list of compiler introduced predicates

Julien Fischer jfischer at opturion.com
Mon May 25 15:39:49 AEST 2020


Update the list of compiler introduced predicates.

compiler/simplify_proc.m:
    Update the above list to include those introduced for formatting uints.

library/string.format.m:
    Add a note about updating the above list if new formatting predicates
    are introduced here.

Julien.

diff --git a/compiler/simplify_proc.m b/compiler/simplify_proc.m
index 714121e..e6f694b 100644
--- a/compiler/simplify_proc.m
+++ b/compiler/simplify_proc.m
@@ -843,6 +843,10 @@ simplify_may_introduce_calls(ModuleName, PredName, _Arity) :-
          ; PredName = "format_unsigned_int_component_nowidth_prec"
          ; PredName = "format_unsigned_int_component_width_noprec"
          ; PredName = "format_unsigned_int_component_width_prec"
+        ; PredName = "format_uint_component_nowidth_noprec"
+        ; PredName = "format_uint_component_nowidth_prec"
+        ; PredName = "format_uint_component_width_noprec"
+        ; PredName = "format_uint_component_width_prec"
          ; PredName = "format_float_component_nowidth_noprec"
          ; PredName = "format_float_component_nowidth_prec"
          ; PredName = "format_float_component_width_noprec"
diff --git a/library/string.format.m b/library/string.format.m
index 54d1be9..d8f958a 100644
--- a/library/string.format.m
+++ b/library/string.format.m
@@ -33,6 +33,9 @@
      % are specified, we can avoid requiring the compiler to generate code
      % that allocates memory on the heap.
      %
+    % NOTE: if you add new predicates here then you must also update the
+    % predicate simplify_may_introduce_calls/3 in compiler/simplify_proc.m.
+    %
  :- pred format_char_component_nowidth(string_format_flags::in,
      char::in, string::out) is det.
  :- pred format_char_component_width(string_format_flags::in,


More information about the reviews mailing list