[M3devel] [M3commit] [modula3/cm3] b3c18e: Rework indirect calls to possibly nested procedure...

Rodney M. Bates rodney_bates at lcwb.coop
Tue Dec 1 21:17:00 CET 2015


Yeah, I would like some changes to the IR too.  But it is fairly painful.
Many places need to be changed, and I recall some kind of rebuild/bootstrap
problem too.  I am collecting a list of things I would like, with the idea
of doing it all in one change.  Some of my wishes predate my writing them
down, and I hope I can remember them too.  Some of them are motivated by
debug information.

On 12/01/2015 01:41 PM, Jay wrote:
> I suggest one or two changes to the IR.
>
>
> 1. An "official" in-memory representation of a complete unit or program. Modern systems can afford it.
>
>
> 2. More information with function calls. Likely combining parameters with calls. No more start/end. All parameters must be locals (possibly uplevel) or parameters or globals or temporaries, never expressions. This is likely the case already.
>
>
> And, aside, look what I do for C. I made it work somehow. I don't remember off hand but I did odd stuff also because of static links. Like maybe always passing one, even if null, as last parameter, because extra parameters are always allowed in C. I declare the function pointers with "..." (slightly different in C vs. C++).
>
>
> The gcc backend passes static link in a register dedicated to it.
>
>   - Jay
>
> On Nov 30, 2015, at 2:00 PM, Rodney Bates <rodney.m.bates at acm.org> wrote:
>
>> Moreover, CM3's seemingly nice idea of making IR operators
>> method calls makes it very awkward to do idiom recognition or
>> state-dependent handling of general-purpose operators.
> _______________________________________________
> M3commit mailing list
> M3commit at elegosoft.com
> https://mail.elegosoft.com/cgi-bin/mailman/listinfo/m3commit
>

-- 
Rodney Bates
rodney.m.bates at acm.org



More information about the M3devel mailing list