freenode/#sicl - IRC Chatlog
Search
14:01:39
beach
nij: SICL uses a module named Cleavir to turn Common Lisp source code into an abstract syntax tree that fulfills the requirements for "minimal compilation" according to the standard. The AST also alpha-"renames" all the variables, by turning them into standard objects, and it contains source information too.
14:02:35
beach
Then another Cleavir module turns the AST into high-level intermediate representation, or HIR, which is like a traditional control-flow graph, except that the objects manipulated are all Lisp objects, as opposed to machine values.
14:03:59
beach
We can do various optimizations on HIR before we turn it into MIR (M for "medium") which exposes address calculations. Further optimizations can be done on MIR. Then MIR is turned into LIR (L for "low") which exposes registers in a backend-specific way.
14:04:43
beach
Finally LIR is turned into machine code, using a module called Cluster, which is like an assembler, but it doesn't take text input and instead takes instructions represented as standard objects.
14:07:15
beach
no-defun-allowed is currently working on the register-allocation code for the MIR-to-LIR phase.
14:08:59
beach
nij: To answer your question in #lisp, i.e. how is NIL represented in other Common Lisp implementations, in SICL it's just another symbol, and it will end up in whatever address the bootstrapping procedure happens to have free then.
14:32:45
beach
ebrasca: Fine but a bit strange. Activities with the ELS talk and recent discussions in #lisp are unusual for me.
15:01:54
beach
Not really, no. You are using some library that I don't know by heart, like the one that defines DEFINE-BINARY-STRUCTURE.
15:04:26
ebrasca
I am folliwing the PCL recomendation about how to create macros , it says first creating some example and expanding it by hand.
15:25:02
ebrasca
I know it. If you are interested you can see this document https://www.kernel.org/doc/html/latest/filesystems/ext4/globals.html#super-block
15:25:42
ebrasca
Here my implementation https://github.com/ebrasca/Mezzano/blob/master/file/ext4.lisp
15:28:17
beach
I wasn't planning a file system, but I am sure someone else would like one, so I'll leave it to that someone to implement.
15:34:46
beach
But you need to start putting the right number of semicolons in different comments. :)
15:38:43
beach
Like I said, I don't think I will need a file system very much, so a simple working implementation would be acceptable.
15:40:46
beach
But you also write only two semicolons on the top level. The Common Lisp HyperSpec says to use three.
17:24:38
edgar-rft
ACTION is waiting for the day where Lisp compilers complain about the wrong number of semiolons