[m-rev.] for post-commit review: simplify management of smart indexing

Zoltan Somogyi zoltan.somogyi at runbox.com
Mon Apr 3 10:02:26 AEST 2023


This diff was tickled by a reference to switch_gen.m in a post
on reddit.com/r/Compilers, of all things. For review by anyone.

Next, I plan to simplify the logic of ml_gen_smart_string_switch,
whose complexity may have been needed when we had IL
and gcc asm as targets, but isn't needed now. Unless someone objects,
this simplification will include the deletion of the test for "does this
MLDS target support switches on ints?", since the only target for which
this was "no" was IL, and I don't expect we will directly target
any language that low level ever again. (The smart way to go
when targeting a *normal* assembler would be to generate
the same MLDS as we would for C, and then *compiling* that MLDS
into assembler, instead of emitting it as C.)

Zoltan.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Log.sw1
Type: application/octet-stream
Size: 1129 bytes
Desc: not available
URL: <http://lists.mercurylang.org/archives/reviews/attachments/20230403/ed5338eb/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: DIFF.sw1
Type: application/octet-stream
Size: 23229 bytes
Desc: not available
URL: <http://lists.mercurylang.org/archives/reviews/attachments/20230403/ed5338eb/attachment-0003.obj>


More information about the reviews mailing list