freenode/#sicl - IRC Chatlog
Search
3:12:36
beach
karlosz: MIR exposes calculations on things such as tags and addresses, so it is highly implementation specific.
3:14:06
karlosz
beach: i'm not sure i follow you, by different implementation. you mean CL implementation?
3:15:10
karlosz
seems like that implementation would need to natively run machine code already. which implementations are you thinking of?
3:16:34
karlosz
although i personally don't know if any compile-down-to-C implementations actually use tagging schemes
3:16:52
karlosz
since you can't really expressing tag layout in portable C if you use tagged pointers
3:19:10
beach
There are things I can do with what I have already. In HIR-to-MIR, I first turn things like FETCH into AREF and READ-CELL int CAR, so I could so some transformations as part of HIR-to-CL. That way they would get tested in the current boot procedure.
3:21:11
karlosz
a MIR interpreter on just a vector serving as memory could test enough of what you need
3:23:38
beach
But accomplishing that seems to be just continuing with MIR-to-LIR, then to assembly, then to machine code. So I would not get to test the particular HIR-to-MIR pass in isolation. But that may be a necessity since I don't have a native implementation of SICL yet.
3:29:05
beach
Perhaps I shouldn't be too worried about this. HIR-to-MIR is very small, especially if I can test the transformation of FETCH, READ-CELL, WRITE-CELL, CREATE-CELL, and perhaps even ECLOSE as part of HIR-to-CL.
3:29:41
beach
When a system is that small, even thought it probably has defects in it, once a defect is found, it is usually easy to fix.
3:30:05
beach
MIR-to-LIR (which exposes registers and explicit stack operations) should be small as well.
3:30:44
beach
So perhaps the fastest strategy is to just get on with it and try to generate an executable ASAP.
4:51:41
beach
So I think I'll start by moving some of the transformations that are now in HIR-to-MIR into HIR-transformations, and apply them in HIR-to-CL, so that I can test them in the boot procedure.
8:56:48
beach
This is looking good. I can turn ENCLOSE into FUNCALL of ENCLOSE, and after closure conversion, I can turn MAKE-CELL into a FUNCALL of CONS, FETCH into AREF, READ-CELL into CAR and write-cell into RPLACA.
8:57:52
beach
I need to centralize information about what the static environment always contains, in addition to the code object.
9:09:31
beach
So by eliminating those instructions at the end of AST-to-HIR, The elimination code can be tested when I do HIR-to-CL and thus run the boot procedure. Plus, there will be much less code in HIR-to-MIR, which was also a goal.