[m-rev.] for post-commit review: fix github issue #118

Zoltan Somogyi zoltan.somogyi at runbox.com
Thu Mar 16 15:03:02 AEDT 2023


For review by anyone.

The diff contains no test case, because the bug occurs when a compiler
invocation gets, from a .int0 file, a mode declaration that specifies
a determinism that is invalid, given the argument types of the predicate
in question. None of the invalid* test directories is set up to handle
test cases like this, so the test case (which is attached) has nowhere to go.
I did check manually that the diff fixes the problem.

The algorithm we use to decide what goes into .int0 files is very primitive,
being inherited almost unchanged from Fergus's "everything is a list of items"
design, and consists of copying items from the parse tree of the .m file
almost unchanged to the .int0 file. We could change this, as we have already
started doing for invalid combinations of type, inst and mode declarations
in .int/.int2 files, but that requires more discussion up front.

Zoltan.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Log.gh118
Type: application/octet-stream
Size: 2530 bytes
Desc: not available
URL: <http://lists.mercurylang.org/archives/reviews/attachments/20230316/757efe1c/attachment-0004.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: DIFF.gh118
Type: application/octet-stream
Size: 23068 bytes
Desc: not available
URL: <http://lists.mercurylang.org/archives/reviews/attachments/20230316/757efe1c/attachment-0005.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gh118.m
Type: application/octet-stream
Size: 212 bytes
Desc: not available
URL: <http://lists.mercurylang.org/archives/reviews/attachments/20230316/757efe1c/attachment-0006.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gh118.gh118_helper.m
Type: application/octet-stream
Size: 172 bytes
Desc: not available
URL: <http://lists.mercurylang.org/archives/reviews/attachments/20230316/757efe1c/attachment-0007.obj>


More information about the reviews mailing list