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

Jay jay.krell at cornell.edu
Wed Dec 2 05:03:48 CET 2015


Feel free to checkin a wishlist/todo.


I feel that I have been through a fair amount & that most of the obstacles to change are actually imaginary. & most of the "difficulties" are "equivalent". 


That is, the build order and scripts are  what they should be, & accommodate all concievable changes.


IF the compiler depends on new language/runtime features then they must be first implemented, build it all, then depend on it. But this probably doesn't apply here.


 - Jay

On Dec 1, 2015, at 1:17 PM, "Rodney M. Bates" <rodney_bates at lcwb.coop> wrote:

> 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
> _______________________________________________
> M3commit mailing list
> M3commit at elegosoft.com
> https://mail.elegosoft.com/cgi-bin/mailman/listinfo/m3commit



More information about the M3commit mailing list