[m-rev.] for review: extend mutual tail rec optimization to functions

Zoltan Somogyi zoltan.somogyi at runbox.com
Sat Sep 23 04:44:37 AEST 2017



On Fri, 22 Sep 2017 15:16:03 +1000, Peter Wang <novalazy at gmail.com> wrote:
> The compiler generates invalid C code for the attached test case
> following this change.
> 
> % mmc -s hlc.gc -c test2.m
> test2.c: In function ‘test2__test_foo_1_p_0’:
> test2.c:633:14: error: ‘succeeded’ undeclared (first use in this function)
>        return succeeded;
> 	      ^
> test2.c:633:14: note: each undeclared identifier is reported only once for each function it appears in
> test2.c: In function ‘test2__test_bar_1_p_0’:
> test2.c:686:14: error: ‘succeeded’ undeclared (first use in this function)
>        return succeeded;

The attached diff fixes that bug. Post commit reviews welcome.

Zoltan.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: Log.onlyrec
Type: application/octet-stream
Size: 387 bytes
Desc: not available
URL: <http://lists.mercurylang.org/archives/reviews/attachments/20170923/4b7070e2/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: DIFF.onlyrec
Type: application/octet-stream
Size: 5171 bytes
Desc: not available
URL: <http://lists.mercurylang.org/archives/reviews/attachments/20170923/4b7070e2/attachment-0001.obj>


More information about the reviews mailing list