libera/#sicl - IRC Chatlog
Search
10:08:30
jackdaniel
bike: in bir are "no exit" (i.e non-local return-from) iblocks connected to the final exit node or they just hang as leafs?
12:10:54
bike
jackdaniel: "final exit node" meaning? an iblock can be terminated by an UNWIND for a nonlocal exit, and the UNWIND has a DESTINATION slot holding the iblock it exits to, as well as a reerence to the COME-FROM instruction establishing the exit point
12:15:46
jackdaniel
bike: "normal" control-flow graph has the entry block and the exit block; do you connected non-local control transfers to the exit block?
12:22:38
bike
a bir function may have a block terminated by a returni instruction, representing normal return from the function - is that what you mean by exit block? if so, there's no guarantee there's an exit block at all (for functions that always loop or NLX). if a function has an NLX and a normal return, the NLX is not connected directly to the normal return, but is indirectly connected through the predecesssor in the
12:38:04
bike
also, i think you mentioned earlier that while you were looking into the design, you weren't going to use cleavir in ecl. can i ask why?
12:39:30
jackdaniel
cleavir seems to be whole package, so I'd need to pull the reader, the ast representation and many other things and add ecl-specific bits - that'd be effectively dumping the compiler and replacing it with a new component (that seems to be more work)
12:40:30
jackdaniel
the second reason is that cleavir probably would be rather expensive to invoke, and that would add up with gcc invocation
12:41:54
jackdaniel
(that said I'm not saying that I'll never use cleavir in ecl, but that's rather out of the scope of what I'm doing right now)
12:42:45
bike
it should be possible to use the IR bits without using ASTs. i'm about halfway through a system to convert the cvm bytecode directly to IR. it's not done, so i can't honestly recommend it to you or anything, but i am working on making the IR and transformations usable by themselves
12:43:36
bike
as for expense to invoke, yeah, it's not too zippy, and making it faster is a low priority so far
12:44:23
jackdaniel
the main motivation of what I'm doing right now is to separate the frontend from the backend of the compiler, so I can output the bytecode and/or the web assembly
12:45:04
jackdaniel
(because the bytecodes compiler as it is does only a minimal compilation and not on all targets the c compiler is available)
13:25:30
jackdaniel
bike: here's another question - in compile-ast you stipulate that the function returns NIL for no values, :no-return or (list bir) -- is NIL used anywhere? if so, couldn't it be represented with a bir standing for 0 values?
13:51:08
bike
jackdaniel: that's "no values" in a sense different from (values) - it means for ASTs that conceptually do not return values, like set-constant-symbol-value
14:00:13
jackdaniel
this ast does not seem to have a documentation; what is an advantage of having ast nodes that do not return values but are not non-local transfer control?
14:05:15
bike
set-constant-symbol-value represents the setting part of (setf *special* value). it's generated by convert-setq-special-variable. if you check convert-setq.lisp, you can see it only generates it in the middle of a progn where it's OK
14:06:22
jackdaniel
I see; would it make a difference if it was handled as if it were returning 42 or anything else?
14:12:19
bike
i'm not sure exactly what that would mean. the equivalent instruction has no outputs, so it doesn't "really" return anything
14:13:55
jackdaniel
I was thinking whether there are some gotchas if I don't handle such special case myself, that's all. I think I have a gist of it, thanks
14:18:48
bike
there are few of the no-value ASTs and it might be a good idea to eliminate them to make things more regular.