[m-rev.] for review: stop using .tmp files when writing .intN files

Zoltan Somogyi zoltan.somogyi at runbox.com
Mon Feb 12 16:04:28 AEDT 2024


For review by anyone.

I am also attaching the new version of the key module in this diff,
because it is easier to read its relevant parts there than in the diff.

Note that even after this is committed, we will still be using
.tmp files for .opt and .trans_opt files. I intend to fix that as well,
as a separate change.

I also intend to look into ways to read in the old file not into
a string, but into a byte array. For C, that can be trivially cast
to a string (if it is null terminated) since both the file and the
C string are UTF-8. For C#/Java, we can convert it into a UTF-16
string as a separate step, but this will just about never be needed,
because (in the usual absence of smart recompilation), all we need
the byte array for is to compare it for equality/nonequality with
the byte array form of the new parse tree. This should allow us
to avoid some encoding changes. I will need your help when
doing that.

Zoltan.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Log.notmp
Type: application/octet-stream
Size: 1458 bytes
Desc: not available
URL: <http://lists.mercurylang.org/archives/reviews/attachments/20240212/363b9e5c/attachment-0003.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: DIFF.notmp
Type: application/octet-stream
Size: 45915 bytes
Desc: not available
URL: <http://lists.mercurylang.org/archives/reviews/attachments/20240212/363b9e5c/attachment-0004.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: write_module_interface_files.m
Type: application/octet-stream
Size: 31641 bytes
Desc: not available
URL: <http://lists.mercurylang.org/archives/reviews/attachments/20240212/363b9e5c/attachment-0005.obj>


More information about the reviews mailing list