[m-rev.] for review: replace four "safe num digits" tables with one

Zoltan Somogyi zoltan.somogyi at runbox.com
Tue Sep 15 20:32:56 AEST 2026


For review by Julien. I used an awk script to merge the four old tables
into the new table, so you don't need to check every entry in it.

Unless you object, I also intend to move all the get_num_X_digits_in_Y
and fill_string_with_X macros from the foreign_decl block at the start
of the implementation section into a new file in the runtime, and
replace them a #include of that new file.

I also intend to move the implementations of the builtin_type_to_string
and string_to_builtin_type kinds of predicates (including the string to int
predicates) to new submodules of string.m, named maybe string.from_builtin
and string.to_builtin. (string.to_string is already taken.)

The objective of all this is to reduce the size of string.m (which is now
the largest library module by far)  and keep it manageable.

Zoltan.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Log.snd
Type: audio/basic
Size: 106 bytes
Desc: not available
URL: <http://lists.mercurylang.org/archives/reviews/attachments/20260915/570df641/attachment.snd>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: DIFF.snd
Type: audio/basic
Size: 13323 bytes
Desc: not available
URL: <http://lists.mercurylang.org/archives/reviews/attachments/20260915/570df641/attachment-0001.snd>


More information about the reviews mailing list