[m-rev.] for review: pack small args next to local secondary tags

Zoltan Somogyi zoltan.somogyi at runbox.com
Mon Jul 2 10:32:44 AEST 2018


For review by anyone. Note that so far, I have bootchecked it
only in asm_fast.gc and hlc.gc with the new data representation
enabled, but I will test it in other grades and with the new representation
disabled before commit.

The reason why there are no new test cases is that the compiler,
library and the existing test cases have several types that the
new representation applies to. (I discovered this the hard way.)
However, if anyone wants to propose new test cases, please
feel free to ask for them.

This is one of the data representation optimizations we have discussed
before. Before I start on the next, packing small args next to *remote*
secondary tags, or even extending this one to types with only one
function symbol (see the Log file), I plan to make two kinds of
housekeeping changes. One is to split up unify_gen.m and ml_unify_gen.m
into several modules each, with the new modules implementing tests,
constructions, deconstructions, and utility predicates respectively.
The other is to remove unnecessary differences between the LLDS
and MLDS versions of code generation for unifications. Some of
the differences are of course needed, but much of the code now deals
not with code generation itself but with the management of argument
packing, so removing unnecessary differences seems a prerequisite
to factoring out any commonalities between the backends.

The attached diff would have been easier to write if I had made these
two housekeeping changes before I started, but I discovered the need
for them only while writing the diff. Only hindsight is 20/20 :-(

Does anyone object to the module splits? After this diff, the two modules
are about 4000 and 3000 lines respectively.

Zoltan.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Log.lpack
Type: application/octet-stream
Size: 6271 bytes
Desc: not available
URL: <http://lists.mercurylang.org/archives/reviews/attachments/20180702/ca821961/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: DIFF.lpack
Type: application/octet-stream
Size: 216946 bytes
Desc: not available
URL: <http://lists.mercurylang.org/archives/reviews/attachments/20180702/ca821961/attachment-0003.obj>


More information about the reviews mailing list