On Tue 21 May 2013 05:21, Noah Lavine <noah.b.lav...@gmail.com> writes:
> * Missing distinction between original names and unique names. > > > Yes, I agree. I think it even reuses original names sometimes, which is > not good. I should just rename everything. You should have two names: the original ones and the gensyms that come from tree-il. Creating new gensyms should happen when copying or fabricating new nodes, as peval does, but in most cases you don't need to do it, and in any case it can be tricky. I would take tree-il as the guide here. > * Missing source information. > > > The issue here is not that it's hard to pass source information through > to the compiler, but that I haven't figured out what to do with it when > I have it. I imagine that your ELF work has solved this problem. I haven't handled source information yet, but to the CPS->RTL compiler it will look like emitting special instructions, like the tree-il->glil compiler emits <glil-source> nodes. > * Missing procedure properties. > > Can you explain what you mean? Does the compiler need to handle > procedure properties specially? This is lambda-properties. You just pass them through, and add them to the begin-program in the RTL. Note that wip-rtl-may-2013 and the RTL branches that are under review for master are slightly different from the ones you have. Their begin-program has a second argument, the procedure properties, and the first argument is a label and not a name. They have begin-*-arity and end-arity for marking arity information and performing arity prologues. There are some slight changes to instructions but not much. OTOH they do have some better type checking and a disassembler that works, so many things should be easier ;) Compare the rtl.test there and your rtl.test for details. > * Why is there no "let" that can bind functions? You don't always > want > to set up a recursive binding environment. > > * Lambdas are missing lambda* and case-lambda support. > > With these two, it's just that I haven't implemented it yet. I'll try to > do it quickly, although I don't know how much time I'll have to work on > it. Understood. However the question of language is fundamental for enabling collaboration on this code. I would be very happy to see a CPS language definition that could express all of Tree-IL. I don't think this would take a lot of work -- it is perfectly acceptable to throw "unimplemented" for those parts of the compiler that aren't there yet, but the language itself should be adequately expressive. IMHO anyway. Do you think you will have time to do that over the next few days or so? Apologies for the pressure, just that I would like to do some things in this area and am not sure how best to do them :) > Sounds great! I think the compiler stuff is fairly separate from the RTL > stuff - when I've rebased it occasionally, it hasn't been a problem. Excellent :) Note the changes I mentioned above. Cheers, Andy -- http://wingolog.org/