[m-rev.] for review: Reduce memory requirement to build compiler in profdeep grade.

Zoltan Somogyi zoltan.somogyi at runbox.com
Wed May 12 15:57:26 AEST 2021


2021-05-11 18:07 GMT+10:00 "Peter Wang" <novalazy at gmail.com>:
> I think we'd need to cut the file down to a reasonable test case, and
> should avoid using non-local gotos, as I don't think gcc developers
> would take kindly to that (even if it turns out to be irrelevant,
> I can see it being a reason to ignore a bug report).
> I'm not really interested, so take it up if you like.

I think you are right about it being too long a shot.

> output_int_binop_for_java needs to handle various cases that require
> extra casts/masking, so I don't think it's that simple. I left it as-is.

OK, so I have done it instead. The diff is attached, the first bootcheck
is now on to the tests. For review by you, Peter, since you have the right
details swapped in.

Note that the diff is hard to read, even with diff --patience, because it
deletes almost twice as many lines as it adds. I think the best way to review it
would be to just apply it and read the result, or to read only the lines
starting with + in the diff. I think the new version of the code, besides
being shorter, is also much more readable.

Does anyone know why in some cases, when the result of a binop
needs to be cast, we output

   (cast-to-type) (operand1 op operand2)

while in other cases we output

  ((cast-to-type) (operand1 op operand2))

In other words, why we put parentheses around the whole thing
in some cases but not in others?

Zoltan.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Log.binop
Type: application/octet-stream
Size: 680 bytes
Desc: not available
URL: <http://lists.mercurylang.org/archives/reviews/attachments/20210512/538a1e49/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: DIFF.binop
Type: application/octet-stream
Size: 45182 bytes
Desc: not available
URL: <http://lists.mercurylang.org/archives/reviews/attachments/20210512/538a1e49/attachment-0003.obj>


More information about the reviews mailing list