[m-rev.] for review: string trie switches for the LLDS, non-lookup edition
Zoltan Somogyi
zoltan.somogyi at runbox.com
Tue Mar 26 20:36:14 AEDT 2024
On 2024-03-26 17:04 +11:00 AEDT, "Peter Wang" <novalazy at gmail.com> wrote:
> I expect user programs would also find it useful if we export a function
> (from the string module) to take the place of internal_encoding_is_utf8,
> e.g.
>
> :- type string_encoding
> ---> utf8
> ; utf16.
>
> :- func internal_string_encoding = string_encoding.
I have added this function to string.m, and mentioned it in NEWS.md.
The diff of the former is attached.
> The comment is wrong about the C# and Java backends. Just say that trie
> switches have only been implemented with C host and target.
Done, in both places. I also fixed the indentation.
> We should have a test in which a trie node causes a code point to be
> split in the middle of its code unit sequence.
Yes, we should. We also should have an explicit test for the special-casing
of sticks, though the compiler itself has examples of that. I will update
the test case in a separate diff.
> I didn't every line that closely, but it looks fine.
Thank you.
Zoltan.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: DIFF.ise
Type: application/octet-stream
Size: 4971 bytes
Desc: not available
URL: <http://lists.mercurylang.org/archives/reviews/attachments/20240326/b202ad01/attachment.obj>
More information about the reviews
mailing list