freenode/#sicl - IRC Chatlog
Search
10:17:09
beach
So a compiled file is just an external version of the AST, and we decided that the form the AST takes there is independent of the backend.
10:18:35
beach
So constants in the code have not yet been segregated into immediate values that the native code can handle and constants that must be created at "load time".
10:19:00
beach
However, once the AST is read from file, everything from then on is specific to a backend.
10:19:25
beach
So I don't see any reason to avoid doing transformations on the AST that depend on the backend, before that AST is turned into HIR.
10:20:30
beach
Since it is easier to do transformations on the AST than it is to do them on the HIR code, it seems like I should move some transformations that I currently do in HIR to the AST level.
10:22:28
beach
Perhaps even things like argument processing. All those transformations are hard in HIR.
10:23:43
heisig
Every Lisp programmer can write AST transformations, but not every Lisp programmer can write HIR transformations.
10:27:43
beach
But my main work for today is to figure out what I mean by "the compiler" in the context of SICL. It is clearly neither COMPILE-FILE, COMPILE, EVAL, nor LOAD. COMPILE-FILE is just creating an AST so it is not really part of "the compiler". I want "the compiler" to mean what is done to an AST, so that "the compiler" can be used by COMPILE, EVAL, and LOAD.
10:28:02
beach
Then I have to figure out how "the bootstrapping compiler" differs from "the native compiler".
10:28:30
beach
I know, it is just a matter of terminology, but the right terminology will determine the modular structure of the entire thing.
10:29:44
beach
Indeed. And I think that failing to define what "the compiler" means has prevented me from accomplishing some code factoring that is now urgently needed.