[m-rev.] for review: make many integer casts into builtins

Zoltan Somogyi zoltan.somogyi at runbox.com
Thu May 24 09:31:18 AEST 2018


For review by Julien. The first part of the diff to compiler/options.m
is not intended to be committed, at least not now.

Julien, it seems that library/{int,uint}{8,16,32,64}.m have
significant differences between them that I see no reason for.
Before this diff is committed, those should be fixed. (Otherwise,
three of the operations that this diff makes into builtins won't have
any declarations.) The way I would do it would be to pick one,
probably uint64.m because it is the longest file, put its function
and predicate declarations into a logical order if necessary,
make its function and predicate definitions match the declaration
order (using the now-commented-out option in Mercury.options),
and then systematically change every other file named above
to match it in terms of what functions and predicates are declared
and defined in what order. This requires making decisions such as:
"this function is declared as to_int in this module and as cast_to_int
in the other module; which name should we use everywhere?".

Do you think you should do that, or should I?

Zoltan.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Log.cast
Type: application/octet-stream
Size: 1458 bytes
Desc: not available
URL: <http://lists.mercurylang.org/archives/reviews/attachments/20180524/5e7c8cf9/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: DIFF.cast
Type: application/octet-stream
Size: 24405 bytes
Desc: not available
URL: <http://lists.mercurylang.org/archives/reviews/attachments/20180524/5e7c8cf9/attachment-0003.obj>


More information about the reviews mailing list