[m-rev.] for review: split_file, and an upcoming diff

Zoltan Somogyi zoltan.somogyi at runbox.com
Mon Mar 9 14:35:26 AEDT 2020


I wrote a small utility program to help me split up a Mercury module.
Since I found it useful, I am proposing to add it to the extras,
in a new directory. The attachment contains the proposed
three files in that directory. I am not posting a diff because
that would require at least a "git add -N" on the extras directory,
and one of the things I am seeking feedback on is the name
of the tool, which should also be the name of that directory.

I am just finishing up a big diff (35k+ lines) that replaces
the pervasive use of item blocks in the pre-HLDS phases of the
compiler with the use of file-kind-specific parse trees. Besides
encoding many more invariants into types, the new architecture
should be more efficient (since those bespoke parse trees store
everything in item-kind-specific lists, operations on each specific
kind of item won't have to wade through item blocks full of
other kinds of items). However, the main motivation for the change
is that the new design is much more flexible. For example,
it should be possible to restrict the use of each .int2 file read in
to the purpose it was read in for, and no more. And it also has
a record of all the parse trees read in, which should make it
much easier to implement Peter's suggestion from 5 aug 2019
for speeding up the implementation of transitive intermodule
optimization.

I expect the diff to be ready for review tomorrow or wednesday.
It already bootchecks with -O5 --intermodule-optimization;
I am just polishing the programming style and the comments.
Does anyone want to volunteer to review it?

Zoltan.



More information about the reviews mailing list